Skip to main content

naaf

naaf is a library for reading and writing Cryo-ET data based on the cryotypes specification.

Installation

pip install naaf

Usage

naaf provides granular I/O functions such as read_star and read_mrc, which will all return objects following the cryotypes specification. A higher level function called read adds some magic to the IO procedure, guessing file formats and returning a list of cryotypes.

Similarly to the read_* functions, naaf provides a series of write_* functions.

From the command line

If you just need to quickly inspect your data, this command will land in an ipython shell with the loaded data collected in a list called data:

naaf path/to/files/* /other/path/to/file.star

Features

Currently naaf is capable of reading images in the following formats:

  • .mrc (and the .mrcs or .st variants)
  • Dynamo .em

and particle data in the following formats:

  • Relion .star
  • Dynamo .tbl
  • Cryolo .cbox and .box

Writer functions currently exist for:

  • .mrc
  • Dynamo .em
  • Relion .star
  • Dynamo .tbl

Image data

When possible (and unless disabled), naaf loads images lazily using dask. The resulting objects can be treated as normal numpy array, except one needs to call array.compute() to apply any pending operations and return the result.

Contributing

Contributions are more than welcome! If there is a file format that you wish were supported in reading or writing, simply open an issue about it pointing to the specification. Alternatively, feel free to open a PR with your proposed implementation; you can look at the existing functions for inspiration.

Metadata

Release files for naaf 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for naaf 0.3.1
File Size Uploaded
naaf-0.3.1.tar.gz 30.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for naaf 0.3.1
File Interpreter ABI Platform
naaf-0.3.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 64.3 kB

Release files / naaf-0.3.1.tar.gz

Download URL naaf-0.3.1.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
926dee35e3d7bfbab5fb7d1d3f103260bfd10a391d3f992291fae0628a18daea
BLAKE2b-256 checksum
How to use checksums
583398d79c26b023a479f015d3ab0318740992c24c38d0d606177b1a9333189f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / naaf-0.3.1-py2.py3-none-any.whl

Download URL naaf-0.3.1-py2.py3-none-any.whl
Size 34.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b5c38ccbb9cd3d6c0d0379a639d06bddae79417655b2bf48f04cb5d3b923cfaf
BLAKE2b-256 checksum
How to use checksums
807e3b9851056d66d4fcaa7fd27ea7fe99021270f050ffb4e1fef95d8dcd0cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page