Skip to content

Minimise the number of times roi is called in Refocus.autofocus #18

@PinkShnack

Description

@PinkShnack

Problem

In most of my cases, if I am calling the Refocus.autofocus method, I am using the same value for the roi argument.

Therefore, every time I call this method, the roi checks are being performed even though they don't need to be.

Possible Solutions

Implement roi as a Refocus class attribute, which will be checked once when instantiating the class or anytime a Refocus.parse_roi() method is called (in the case that users want to change the roi each Refocus.autofocus call). See #16 and #17.

Notes

The Refocus.autofocus roi argument could be deprecated or left as is for convenience.

I would say this issue is low priority, because the speed gains are likely small.

To do:

  • Implement roi as a Refocus class attribute
  • Refactor the roi docstring a little bit so that it displays nicely with sphinx (use bullet points, similar to the metric docstring param description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions