Opened 2 years ago
Closed 2 years ago
#9405 closed enhancement (fixed)
Allow reading and writing 16-bit float MRC files
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Volume Data | Version: | |
Keywords: | Cc: | Elaine Meng | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
From: Ricardo Righetto via ChimeraX-users <chimerax-users@…>
Subject: [chimerax-users] Feature request: support for MRC mode 12 (float16)
Date: July 19, 2023 at 4:29:06 AM PDT
To: ChimeraX Users Help
Reply-To: Ricardo Righetto
Dear ChimeraX team,
It seems that ChimeraX (tested version 1.6.1) does not yet support MRC data mode 12, corresponding to half-precision floating point (float16). This data mode is now supported in RELION-4 and IMOD, and is interesting to save storage in cryo-ET and subtomogram averaging workflows.
Would it be possible to implement support for reading and writing this MRC data mode in ChimeraX?
Thank you!
Best wishes,
--
Ricardo Diogo Righetto
Change History (3)
comment:1 by , 2 years ago
comment:2 by , 2 years ago
Hi Tom, You can download a small tomogram in 16-bit float format here: https://drive.switch.ch/index.php/s/YUPsC0NJeOqxyyl Thank you! -- Ricardo Diogo Righetto Em qua., 19 de jul. de 2023 às 19:40, ChimeraX < ChimeraX-bugs-admin@cgl.ucsf.edu> escreveu: > >
comment:3 by , 2 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Done. In ChimeraX daily builds dated July 19, 2023 and later.
Reading MRC files with 16-bit float (mrc value type 12) now works but the map in memory is 32-bit float because C++ does not have a 16-bit float type.
To write an MRC file with 16-bit float values use the new valueType keyword, for example,
save mymap.mrc valueType float16 model #5
The allowed value types are int8, int16, uint16, float16, float32. If the actual map values are outside of the range of the requested value type then the resulting saved values are undefined (they are not clamped to minimum and maximum values for the requested type).
Ricardo, can you give me a small MRC map file in 16-bit float format? If you can I can probably easily add reading, and probably writing too to the ChimeraX daily build.