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

Fixed detector positioning in msot acuity echo #149

Merged
merged 2 commits into from
Jun 14, 2022
Merged

Fixed detector positioning in msot acuity echo #149

merged 2 commits into from
Jun 14, 2022

Conversation

kdreher
Copy link
Collaborator

@kdreher kdreher commented Jun 9, 2022

Fix for detector geometry positioning. When the device_position_mm of the MSOTAcuityEcho is already defined at the outer side of the membrane, the center of the detector geometry is only self.focus_in_field_of_view_mm (8mm) further away from the membrane

@kdreher kdreher requested a review from jgroehl June 9, 2022 15:42
@jgroehl
Copy link
Collaborator

jgroehl commented Jun 13, 2022

Looks sensible.
Did you test this/validate that it is correct?
Is there a possibility to add a test that detects when the definitions of devices are wrong?

Feel free to merge this if you are confident the device is now correctly represented!

@kdreher
Copy link
Collaborator Author

kdreher commented Jun 14, 2022

@jgroehl I ran all the tests and everything that should work also worked, however, in the examples I realized that there was another bug with the positioning. I corrected that with a new commit

@jgroehl
Copy link
Collaborator

jgroehl commented Jun 14, 2022

Great that the checks are now running automatically!! many thanks for setting this up @kdreher !!

Copy link
Collaborator

@jgroehl jgroehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a general question regarding the introduced variable.
Please merge :)

@@ -190,7 +188,7 @@ def update_settings_for_use_of_model_based_volume_creator(self, global_settings)
self.set_detection_geometry(detection_geometry)
for illumination_geom in self.illumination_geometries:
illumination_geom.device_position_mm = np.add(illumination_geom.device_position_mm,
np.array([0, 0, probe_size_mm]))
np.array([width_shift_for_structures_mm, 0, probe_size_mm]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand where this is coming from exactly.. Is it for "sliding" a probe along the x-axis to potentially simulate multiple areas of the same tissue model?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this comes from the check if the volume is not wide enough. Then the volume is enlarged on both sides and the structures are shifted accordingly so that they are still in the middle of the volume. Then, the device position also needs to be shifted by the same width. The device itself and the detection geometry were already shifted by that width but not the illumination

@kdreher kdreher merged commit 988f294 into main Jun 14, 2022
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

Successfully merging this pull request may close these issues.

2 participants