Metadata-Version: 2.4
Name: nxtomo
Version: 3.0.0.dev1
Summary: module to create / edit NXtomo application
Author-email: Henri Payno <henri.payno@esrf.fr>, Pierre Paleo <pierre.paleo@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>, Pierre-Olivier Autran <pierre-olivier.autran@esrf.fr>
License: 
        The nxtomo library goal is to provide a powerful python interface to read / write nexus NXtomo application
        
        nxtomo is distributed under the MIT license.
        
        The MIT license follows:
        
        Copyright (c) European Synchrotron Radiation Facility (ESRF)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://gitlab.esrf.fr/tomotools/nxtomo
Project-URL: Documentation, https://tomotools.gitlab-pages.esrf.fr/nxtomo/
Project-URL: Repository, https://gitlab.esrf.fr/tomotools/nxtomo
Project-URL: Changelog, https://gitlab.esrf.fr/tomotools/nxtomo/-/blob/master/CHANGELOG.md
Keywords: NXtomo,nexus,tomography,tomotools,esrf
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: h5py>=3.0
Requires-Dist: silx>=2.0
Requires-Dist: pint
Requires-Dist: packaging
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: black; extra == "test"
Requires-Dist: isort; extra == "test"
Requires-Dist: ruff; extra == "test"
Provides-Extra: doc
Requires-Dist: Sphinx; extra == "doc"
Requires-Dist: nbsphinx; extra == "doc"
Requires-Dist: jupyterlab; extra == "doc"
Requires-Dist: ipykernel; extra == "doc"
Requires-Dist: nbconvert; extra == "doc"
Requires-Dist: pandoc; extra == "doc"
Requires-Dist: scikit-image; extra == "doc"
Requires-Dist: h5glance; extra == "doc"
Requires-Dist: jupyter_client; extra == "doc"
Requires-Dist: pydata_sphinx_theme; extra == "doc"
Requires-Dist: sphinx_autodoc_typehints; extra == "doc"
Requires-Dist: myst-parser; extra == "doc"
Dynamic: license-file

<p align="left">
  <img src="nxtomo/resources/nxtomo.png" alt="nxtomo" width="180">
</p>

The goal of the `nxtomo` project is to provide a powerful and user-friendly API to create, edit or read [NXtomo](https://manual.nexusformat.org/classes/applications/NXtomo.html) application definition files.


Please find at https://tomotools.gitlab-pages.esrf.fr/nxtomo the latest documentation

```bash
pip install nxtomo
```

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

```bash
pip install nxtomo[doc,test]
```

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

```python
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.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](https://tomotools.gitlab-pages.esrf.fr/nxtomo/tutorials/index.html), such as splitting large acquisitions or working with TIFF backends.

## Documentation and Support
- Latest documentation: https://tomotools.gitlab-pages.esrf.fr/nxtomo/
- API reference: https://tomotools.gitlab-pages.esrf.fr/nxtomo/api.html
- Report issues and follow development on GitLab: https://gitlab.esrf.fr/tomotools/nxtomo

## 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.
