Skip to main content

nxtomo

The goal of the nxtomo project is to provide a powerful and user-friendly API to create, edit or read NXtomo application definition files.

pip install nxtomo

Add the optional extras when you need documentation or development tooling:

pip install nxtomo[doc,test]

Quick Start

Create a minimal NXtomo scan, populate detector data, and save it to disk:

import numpy as np
from pint import get_application_registry

from nxtomo.application.nxtomo import NXtomo
from nxtomo.nxobject.nxdetector import ImageKey

ureg = get_application_registry()

nx = NXtomo()
nx.title = "Demo scan"
nx.instrument.beam.incident_energy = 18 * ureg.keV

n_frames = 180
nx.instrument.detector.data = np.random.rand(n_frames, 64, 64).astype(np.float32)
nx.instrument.detector.image_key_control = np.full(
    n_frames, ImageKey.PROJECTION.value, dtype=np.uint8
)
nx.sample.rotation_angle = (
    np.linspace(0.0, 180.0, n_frames, endpoint=False) * ureg.degree
)

output_file = "demo_scan.nx"
nx.save(output_file, data_path="/entry0000")

loaded = NXtomo().load(output_file, data_path="/entry0000")
print(f"Energy: {loaded.energy}, Rotation angles: {loaded.sample.rotation_angle}")

Explore additional workflows in the tutorials, such as splitting large acquisitions or working with TIFF backends.

Documentation and Support

Contributing

Contributions and feedback are welcome. Please open an issue or submit a merge request on GitLab. See the development guide in doc/development for details on setting up a local environment and running the test suite.

License

nxtomo is released under the MIT License. See LICENSE for the full text.

Metadata

Release files for nxtomo 3.1.2

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

Source distribution (sdist)

Source distribution for nxtomo 3.1.2
File Size Uploaded Provenance Actions
nxtomo-3.1.2.tar.gz 78.7 kB Without provenance Details for nxtomo-3.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nxtomo 3.1.2
File Interpreter ABI Platform Actions
nxtomo-3.1.2-py3-none-any.whl Python 3 none any Details for nxtomo-3.1.2-py3-none-any.whl

Total release size: 174.6 kB

Release files / nxtomo-3.1.2.tar.gz

Download URL nxtomo-3.1.2.tar.gz
Size 78.7 kB
Tags Source
SHA-256 checksum
How to use checksums
291b850bb4486629b835b33e1a722ce022d838de4e55536f0a033c3c097232ef
BLAKE2b-256 checksum
How to use checksums
89095e12c1ed93b6ad7717ce8c5d1265d1c1dc4121ddd0d1fb83ef64ceab3166
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / nxtomo-3.1.2-py3-none-any.whl

Download URL nxtomo-3.1.2-py3-none-any.whl
Size 95.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebb9d23736728ffe8c4b7a45e62619a1c64e3675a32cd66cc38776eb30c4992b
BLAKE2b-256 checksum
How to use checksums
1353d0d85b6feb0eda245c3b9923d4acdb9be338c1e790fe654a67b8f464d26e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for nxtomo 3.1.2

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.

Release history Release notifications | RSS feed

This release

3.1.2 This release

2 release files No provenance

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