Skip to content

add support for mrc files in float16 format from WarpTools#75

Merged
sroet merged 1 commit into
SBC-Utrecht:masterfrom
alncat:float16
Jan 5, 2026
Merged

add support for mrc files in float16 format from WarpTools#75
sroet merged 1 commit into
SBC-Utrecht:masterfrom
alncat:float16

Conversation

@alncat

@alncat alncat commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Dear PyTom developers,
I note that the pytom doesn't support the mrc files in float16 format yet. Hence, I modified the read_mrc function in
pytom/agnostic/io.py to enable this capacity. I was wondering if this functionality is relevant and can be merged.

Best Regards,
Zhenwei

@sroet

sroet commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

Thanks for this PR! Do you by any chance have a link to the documentation for this specific header value?

Also, I will add some tests for this functionality after my Christmas break, so it won't be merged before that.

@alncat

alncat commented Dec 24, 2025

Copy link
Copy Markdown
Contributor Author

@sroet Merry Christmas! Enjoy your break~
Here is the documentation for the header value for your reference, https://www.ccpem.ac.uk/mrc-format/mrc2014/. Mode 12 corresponds to 16-bit float (IEEE754).

@sroet sroet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sroet

sroet commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

Hey @alncat, sorry this took so long, I read this PR originally on my phone and thought it was for pytom-match-pick. which has stricter testing requirements. PyTom is not regularly tested at the moment, so this PR is good to merge as is!

@sroet sroet merged commit c7edbeb into SBC-Utrecht:master Jan 5, 2026
1 check failed
@alncat

alncat commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

@sroet Thank you for merging it!

@alncat alncat deleted the float16 branch January 5, 2026 14:05
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