Add the option to provide a reference file for txrm processing - #271
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
=======================================
Coverage 83.10% 83.11%
=======================================
Files 70 70
Lines 9064 9065 +1
Branches 1245 1245
=======================================
+ Hits 7533 7534 +1
Misses 1048 1048
Partials 483 483 🚀 New features to boost your workflow:
|
stephen-riggs
added a commit
to DiamondLightSource/python-murfey
that referenced
this pull request
Jun 16, 2026
If a txrm does not have an internal reference, instead of dismissing it search for a reference file in xrm format. Takes the most recent xrm which is not a mosaic image. Still skips processing for txrms with less than 20 frames as these will be reference stacks. Also changes the tilt series tags to remove angle naming, and skips transfer of "New folder" Pairs with DiamondLightSource/cryoem-services#271
tieneupin
approved these changes
Jun 16, 2026
tieneupin
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Nice work!
tieneupin
reviewed
Jun 16, 2026
| tifftomo = Path(stack_file).with_suffix(".tiff") | ||
| convert_and_save(txrm_file, str(tifftomo), custom_reference=None) | ||
| convert_and_save( | ||
| txrm_file, str(tifftomo), custom_reference=xrm_reference or None |
Contributor
There was a problem hiding this comment.
This is fine, but did you write it this way to also guard against empty strings? If not, passing xrm_reference directly should already be fine, since it's meant to be a string or None already.
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.
Allow an xrm file to be provided as an external reference for txrm processing.
Also converts from using Optional to |
Pairs with DiamondLightSource/python-murfey#826