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

FormatMRC: more robust handling of extended headers. #679

Merged

Conversation

dagewa
Copy link
Member

@dagewa dagewa commented Jan 11, 2024

  1. Extended headers with padding are now supported in mrcfile>=1.5.0 (Issue reading files with an FEI2 extended header including unused space ccpem/mrcfile#50). For older versions of mrcfile just ignore the extended header.
  2. The only example of a padded extended header I've seen actually contained useless values anyway (with a zero pixel spacing). In this case, also ignore the extended header.

dagewa and others added 3 commits January 11, 2024 15:09
Attempt to process the extended header only if its length is equal
to the number of images.

Ignore extended header values if the pixel size is set to zero.
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (dbd7ede) 42.62% compared to head (5caded7) 42.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
- Coverage   42.62%   42.61%   -0.01%     
==========================================
  Files         182      182              
  Lines       15924    15932       +8     
  Branches     3056     3057       +1     
==========================================
+ Hits         6788     6790       +2     
- Misses       8510     8515       +5     
- Partials      626      627       +1     

@dagewa dagewa merged commit f903a3c into cctbx:main Jan 18, 2024
13 checks passed
graeme-winter pushed a commit that referenced this pull request Feb 5, 2024
For mrcfile>=1.5.0 use the indexed_extended_header.

Attempt to process the extended header only if its length is equal
to the number of images.

Ignore extended header values if the pixel size is set to zero.
toastisme pushed a commit to toastisme/dxtbx that referenced this pull request Jul 18, 2024
For mrcfile>=1.5.0 use the indexed_extended_header.

Attempt to process the extended header only if its length is equal
to the number of images.

Ignore extended header values if the pixel size is set to zero.
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