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

T77 off by one error #174

Merged
merged 8 commits into from
Sep 23, 2022
Merged

T77 off by one error #174

merged 8 commits into from
Sep 23, 2022

Conversation

TomTomRixRix
Copy link
Collaborator

@TomTomRixRix TomTomRixRix commented Aug 30, 2022

Fixes #77 by adding a 0.5 pixel offset to the sensor positions in x direction to make them and the delays to their position symmetric (left most and right most pixels of a centred volume should have the same delay to the detector elements). In y direction the correction in the acoustic simulation was removed which solves the off-by-one error. Please check if this correction is still necessary (in my test case it was not necessary), then we might have to find an other solution.

I've also slightly changed the image dimension computation to reduce rounding issues and mitigate large offset errors by distributing them equally. I've written tests for some cases of this function but we could certainly add even more test cases.

Comment on lines +79 to +80
else:
det_elements = 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should catch the case where a user defines 0 detector elements and throw an Error instead of giving it a detector position

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, in general we should catch the case where number_detector_elements <= 0 as this doesn't make sense. At the moment the else case is only required if number_detector_elements == 1 to set the one detector element into central position.

@kdreher kdreher merged commit 0529b45 into develop Sep 23, 2022
@seitela seitela linked an issue Apr 3, 2023 that may be closed by this pull request
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.

Off-by-one error in reconstructed image FOV
2 participants