-
Notifications
You must be signed in to change notification settings - Fork 1
Add utilities to compute image sharpness #94
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
Conversation
src/ess/imaging/tools/analysis.py
Outdated
|
|
||
|
|
||
| def resample( | ||
| image: sc.Variable | sc.DataArray, sizes: dict[str, int], method: str = 'sum' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about directly passing a callable object as a method argument?
YooSunYoung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only had a minor comment.
src/ess/imaging/tools/analysis.py
Outdated
| # if isinstance(image, sc.DataArray): | ||
| # image = image.data | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # if isinstance(image, sc.DataArray): | |
| # image = image.data |
This adds utilities to compute image sharpness which is used to find the focus point of an imaging detector.
A recording will typically have one image for each camera stage position.
We compute the sharpness of each one of these images, and find the sharpest one which is deemed to be the focus point of the camera.
This is not currently integrated into a full
GenericNeXusWorkflowbecause it is still unclear how the position of the camera will be recorded in the nexus file. Right now, it is recorded in a separateNXlog(camera_stage/position_setpoint), instead of being recorded as a time-dependent translation of the imaging detector.We don't know if this will still be the case in production.
The notebook produces this plot which shows how the focus point is found
