-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make calculation conform to figure in https://arxiv.org/abs/2403.08538 #17
Conversation
Previously, the camera length was measured from the focus point, not the specimen plane as written in the paper
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 5
Lines ? 190
Branches ? 21
========================================
Hits ? 190
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. |
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've tried to understand this, I hope my comments are helpful
y_px, x_px : float | ||
Detector pixel coordinates to project |
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.
As these are float
, does (0.0, 0.0)
correspond to the center of the top-left pixel, or to the top-left corner of the top-left pixel?
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.
Or is (0, 0)
actually the "central pixel" of the detector, which is then actually the center of that pixel? That's what I gather from the "straight through" test case below...
detector_pixel_size, scan_pixel_size : float | ||
Physical pixel sizes. This assumes a uniform scan and detector grid in x | ||
and y direction | ||
camera_length : float | ||
Virtual distance from specimen to detector | ||
overfocus : float | ||
Virtual distance from focus point to specimen. Underfocus is specified | ||
as a negative overfocus. |
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.
What's the unit of these - probably all of these just have to be given in the same unit, but units don't matter otherwise?
LiberTEM. It can be calculated with :fun:`get_transformation_matrix`. | ||
fov_size_y, fov_size_x : float | ||
Size of the scan area (field of view) in scan pixels. The scan | ||
coordinate system is centered in the middle of the field of view. |
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.
What exactly does "centered" mean here? Where does the scan coordinate system have its origin?
y_px, x_px : float | ||
Detector pixel coordinates to project | ||
cy, cx : float | ||
Detector center in detector pixel coordinates |
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.
What does "center" mean here? (h/2, w/2)
? Or the pixel which the optical axis is contained in?
'fov_size_y': 0, | ||
'fov_size_x': 0, |
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.
What does it mean to have fov_size_{x,y}=0
? Shouldn't the scan have at least one scan pixel?
tests/test_overfocus.py
Outdated
detector_shape=(detector_size, detector_size), | ||
sim_params=params, | ||
) | ||
# Center of the scan, severy second detector pixel |
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.
# Center of the scan, severy second detector pixel | |
# Center of the scan, every second detector pixel |
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.
Thanks for the updates - the doc string and comments make it a lot more clear! I've added some more questions - I think some of them can be answered by looking at the figure from the paper, on the other hand, with a bit more clear language it can stand on its own.
Thx! :-)
Previously, the camera length was measured from the focus point, not the specimen plane as written in the paper