tomodrgn.mrc.write#
- write(fname: str, array: ndarray, header: MRCHeader | None = None, angpix: float = 1, origin_x: float = 0, origin_y: float = 0, origin_z: float = 0, is_vol: bool | None = None) None [source]#
Write a data array to disk in MRC format.
- Parameters:
fname – Name of the MRC file to write
array – Array of data to write as data block of MRC file
header – MRCFile header object to be written as the header of the new MRC file. None means that a default header will be created using the following parameters:
angpix – Pixel size of the data to be used in creating the default header
origin_x – new origin along x axis
origin_y – new origin along y axis
origin_z – new origin along z axis
is_vol – Whether the data array represents a volume (versus an image or image stack). None means to infer based on whether data array is a cube (volume-like).
- Returns:
None