Skip to content

Conversation

@alncat
Copy link
Contributor

@alncat alncat commented Dec 22, 2025

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
Copy link
Collaborator

sroet commented Dec 23, 2025

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
Copy link
Contributor Author

alncat commented Dec 24, 2025

@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).

Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

LGTM

@sroet
Copy link
Collaborator

sroet commented Jan 5, 2026

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
Copy link
Contributor Author

alncat commented Jan 5, 2026

@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