tomodrgn.mrc#
Classes and functions for loading and writing .mrc(s) headers and data.
- Generally adheres to the MRC2014 Update 20141 specification.
MRC2014: Extensions to the MRC format header for electron cryo-microscopy and tomography
- Deviations from this standard include:
any data in the extended header is read (and maintained for later writing), but is not interpreted or used in any way;
the machst attribute of the header is unpacked as a byte string (e.g b`DA`) rather than as an array of uint8 (e.g. [68, 65, 0, 0]);
the label attribute of the header is unpacked as a concatenated byte string rather than as an array of byte strings for all 10 80-character labels that may exist
- Prefer the following uses:
interfacing with MRC headers: mrc.MRCHeader.parse() or mrc.parse_header()
loading an entire MRC file into memory: mrc.parse_mrc()
loading a list of MRC files into memory: mrc.parse_mrc_list()
lazily loading a single image from an MRC file: mrc.LazyImage
lazily loading a group of images from an MRC file: mrc.LazyImageStack
writing an MRC file to disk: mrc.write()
Functions
Convenience function to create an MRCHeader object given an MRC file name |
|
Load an entire MRC file into memory as either a numpy array or a list of LazyImages |
|
Load the MRC file(s) specified in a text file into memory as either a numpy array or a list of LazyImages. |
|
Write a data array to disk in MRC format. |
Classes
Class to lazily load data from an MRC file on-the-fly |
|
Efficiently load a particle stack from an NxDxD stack.mrcs file on-the-fly. |
|
Class to parse the header of an MRC file and to write a new MRC header to disk. |