Skip to content

Register lamella image - #905

Merged
tieneupin merged 15 commits into
mainfrom
register-lamella-image
Oct 1, 2026
Merged

tieneupin merged 15 commits into
mainfrom
register-lamella-image

Conversation

@tieneupin

@tieneupin tieneupin commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

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 ImagingSite database entry with data type "atlas") and a thumbnail exists for it (i.e. the thumbnail_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, and tilt_alpha and 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.

@tieneupin tieneupin self-assigned this Sep 30, 2026
@tieneupin tieneupin added enhancement New feature or request server Relates to the server component fib Part of the FIB pipeline extension labels Sep 30, 2026
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.31034% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.42%. Comparing base (fc8355f) to head (fa81e28).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tieneupin
tieneupin marked this pull request as ready for review September 30, 2026 15:28

@stephen-riggs stephen-riggs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@tieneupin

Copy link
Copy Markdown
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.

@tieneupin
tieneupin merged commit cc9def2 into main Oct 1, 2026
14 checks passed
@tieneupin
tieneupin deleted the register-lamella-image branch October 1, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fib Part of the FIB pipeline extension server Relates to the server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants