Register lamella image - #905
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #905 +/- ##
==========================================
+ Coverage 55.29% 55.42% +0.12%
==========================================
Files 103 103
Lines 11491 11546 +55
Branches 1534 1541 +7
==========================================
+ Hits 6354 6399 +45
- Misses 4793 4800 +7
- Partials 344 347 +3 🚀 New features to boost your workflow:
|
tieneupin
marked this pull request as ready for review
September 30, 2026 15:28
stephen-riggs
approved these changes
Oct 1, 2026
stephen-riggs
left a comment
Contributor
There was a problem hiding this comment.
Looks fine from what I can see. One note is that for SPA/tomo we wrote in conditions to make murfey db registration work even if ispyb is not available (i.e. no _transport_object) which you haven't got here. Should be fine as this is only likely to be run with ispyb
Contributor
Author
|
Thanks for the review! I think I'll implement the transport object handling logic in a separate PR and merge this as-is for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds on the GridSquare creation and updating logic for the lamella image registration workflow. If an atlas image has already been registered (i.e., there is an
ImagingSitedatabase entry with data type"atlas") and a thumbnail exists for it (i.e. thethumbnail_pixels_...fields in the table have been populated), it will calculate the length, width, and position of the lamella image relative to the spatial region covered by the atlas image, and insert that into ISPyB.This PR is a bit on the longer side, as a fair number of calculations need to be performed, and many attributes need to be updated.
Currently, we are still trying to establish a mathematical relationship between the values of
y,z, andtilt_alphaand the part of the stage that's in focus. For now, if the z height between the atlas image and lamella images are similar (i.e. within 0.5 mm), the mapping will be fairly accurate.