Python MRCZ meta-compressed file-format module
mrcz is a package designed to supplement the venerable MRC image file format with a highly efficient compressed variant, using the blosc meta-compressor library to shrink files on disk and greatly accelerate file input/output for the era of “Big Data” in electron and optical microscopy.
Python versions 3.11 and newer are supported.
mrcz is currently considered to be a beta development state.
mrcz is released under the BSD 3-clause license.
Installation
A scientific Python installation (such as Anaconda, WinPython, or Canopy) is advised. After installation of your Python environment, from a command prompt type:
pip install mrcz
mrcz has the following dependencies:
numpy
packaging
blosc (optional, but highly recommended)
blosc2 (optional)
Compression backends
The two bindings are not interchangeable, because they emit different chunk formats:
blosc (c-blosc1) writes version-2 chunks, the only ones older mrcz can read. It is the write default, so install it if anything else must read your files.
blosc2 (c-blosc2) reads both formats, so it is preferred for reading. It writes version-5 chunks, used only when asked for, when a blosc2-only codec is requested, or when blosc is absent.
Installing neither disables compression; uncompressed MRC still works.
Pass backend='blosc2' to opt in to version-5 chunks:
mrcz.writeMRC(image, 'out.mrcz', compressor='zstd', backend='blosc2')
On read, header['bloscFormat'] reports the format a file actually uses (1 or 2), detected from the chunk rather than a header flag.
Feature List
Import: DM4, MRC, MRCZ formats
Export: MRC, MRCZ formats
Compress and bit-shuffle image stacks and volumes with blosc meta-compressor
Asynchronous read and write operations.
Support in the hyperspy electron microscopy package.
Documentation
Documentation is hosted at http://python-mrcz.readthedocs.io/
Citations
R.A. McLeod, R. Diogo-Righetto, A. Stewart, H. Stahlberg, “MRCZ – A file format for cryo-TEM data with fast compression,” Journal of Structural Biology, 201 (3) (March 2018): 252-267, https://doi.org/10.1016/j.jsb.2017.11.012
A. Cheng et al., “MRC2014: Extensions to the MRC format header for electron cryo-microscopy and tomography”, Journal of Structural Biology 192(2): 146-150, November 2015, http://dx.doi.org/10.1016/j.jsb.2015.04.002
V. Haenel, “Bloscpack: a compressed lightweight serialization format for numerical data”, arXiv:1404.6383
Metadata
Release files for mrcz 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mrcz-0.6.0.tar.gz | 69.7 kB | Without provenance | Details for mrcz-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mrcz-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for mrcz-0.6.0-py3-none-any.whl |
Total release size: 118.1 kB
Release files / mrcz-0.6.0.tar.gz
| Download URL | mrcz-0.6.0.tar.gz |
|---|---|
| Size | 69.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec307c8900db9729df78ba2953d1675e256d9b0dd9a5961517164bee356e43cf
|
|
BLAKE2b-256 checksum How to use checksums |
68a2026490bd73cee30e4fd6a861ae529d6af268207c0d2681177134b41231c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / mrcz-0.6.0-py3-none-any.whl
| Download URL | mrcz-0.6.0-py3-none-any.whl |
|---|---|
| Size | 48.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d0b78fd40c9c0062b0c7e2b0b5a13f3a45e9ffe2bb66e1fc04b5f4cd4415306
|
|
BLAKE2b-256 checksum How to use checksums |
be4feff3afdfa39e93760dcd8b01ee59f78f4491b05cd4f198bd406f2d1e86c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for mrcz 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.