-
Notifications
You must be signed in to change notification settings - Fork 40
[METEOR-1766] [feature] Add lens metadata to change refractive index factor #3327
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
📝 WalkthroughWalkthroughThis pull request adds support for a refractive index mismatch correction metadata key and uses it in correlation Z-corrections. A new metadata constant Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/odemis/gui/cont/multi_point_correlation.py`:
- Around line 171-172: The code assumes self._main_data_model.lens exists before
calling lens.getMetadata(), which can be None; update the block around lens_md
and self.refractive_scale to defensively handle a missing lens by first checking
self._main_data_model.lens (or using a conditional expression) so lens_md falls
back to an empty dict when lens is None, then call .get(model.MD_RIM_COR,
REFRACTIVE_SCALE) to assign self.refractive_scale; target the code that uses
self._main_data_model.lens.getMetadata(), self.refractive_scale,
model.MD_RIM_COR and REFRACTIVE_SCALE to implement this null-safe behavior.
🧹 Nitpick comments (2)
install/linux/usr/share/odemis/sim/meteor-fibsem-sim.odm.yaml (1)
118-121: Minor formatting inconsistency and clarify comment.
There's a space before the colon in
RIM_COR :(line 120) which is inconsistent with other YAML entries in this file (e.g.,na: 0.85,ri: 1.0).The comment references "50x lens" and "100x0.9 na" values, but the lens magnification in the init block is 84.0. Consider updating the comment to clarify which value applies to this 84x configuration.
Suggested fix
metadata: { # Refractive index mismatch correction factor - RIM_COR : 0.495, # generally for 50x lens use 0.495, 100x0.9 na use 0.6 + RIM_COR: 0.495, # for this 84x lens configuration },install/linux/usr/share/odemis/sim/meteor-tfs3-sim.odm.yaml (1)
73-76: Same formatting and comment issues as the other YAML file.Apply the same fix for consistency: remove the space before the colon and clarify the comment for the 84x lens configuration.
Suggested fix
metadata: { # Refractive index mismatch correction factor - RIM_COR : 0.495, # generally for 50x lens use 0.495, 100x0.9 na use 0.6 + RIM_COR: 0.495, # for this 84x lens configuration },
For Refractive Index mismatch correction
a70ef1b to
ea01edf
Compare
No description provided.