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.

Release files for nxtomo 3.1.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 nxtomo 3.1.1
File Size Uploaded
nxtomo-3.1.1.tar.gz 76.6 kB Details

Built distribution (wheel)

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

Total release size: 169.4 kB

Release files / nxtomo-3.1.1.tar.gz

Download URL nxtomo-3.1.1.tar.gz
Size 76.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c6d6e27a58c436b449157ff0be57a1c90a0cb5200e1cff273017080c177bd7dc
BLAKE2b-256 checksum
How to use checksums
ff95106db349803cfbaacd76259898d04a814b86bfe5a6e6f6961a1871db94f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

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

Download URL nxtomo-3.1.1-py3-none-any.whl
Size 92.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4360457fa6454c75ad72560fe112f72a72f7c348f0ffea6d9deb5c2379ab6ed6
BLAKE2b-256 checksum
How to use checksums
2746da3f5233d7e5a16a49f21f6e27cd821d78ea717f755061dae0ff10dbac25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.0

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