Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
PinkShnack opened this issue Oct 25, 2022 · 0 comments
Open
2 tasks

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

PinkShnack opened this issue Oct 25, 2022 · 0 comments

Comments

@PinkShnack
Copy link
Collaborator

PinkShnack commented Oct 25, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant