Skip to main content

Generic loaders for ESRF useful files

Project description

esrf-loadfile

Standalone re-usable loader utilities for ESRF DCT and tomography data formats.
These helpers were extracted from the StatusGUI code base so that other tools can inspect .h5, .mat, .cif, and reflection files without depending on the GUI.

Installation

pip install esrf-loadfile

For local development inside the StatusGUI monorepo you can install it in editable mode:

pip install -e loadfile

Usage

from esrf_loadfile import loadFile

handler = loadFile("/path/to/parameters.h5")
print(handler.get_keys("entry/detector"))

# Nested keys work end-to-end:
dataset = handler.get_value("entry/detector/data")
print(handler.get_size("entry/detector/data"))
print(handler.get_description("entry/detector/data"))

# Inline dataset specs return the value directly:
dataset = loadFile("/path/to/parameters.h5::/entry/detector/data")

Inline specs are useful when you want a one-liner that returns the dataset directly.

Development

Install the project in editable mode together with its test dependencies and run the test-suite:

pip install -e .[test]
PYTHONPATH=src pytest

To run the code-coherency checks (imports/formatting/linting) install the dev extras and run Ruff on the sources:

pip install -e .[dev]
ruff check src tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esrf_loadfile-0.2.1.tar.gz (30.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esrf_loadfile-0.2.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file esrf_loadfile-0.2.1.tar.gz.

File metadata

  • Download URL: esrf_loadfile-0.2.1.tar.gz
  • Upload date:
  • Size: 30.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for esrf_loadfile-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f64ce93615125138ece50737b44daa3873f521746159a7c9eb11702004afff03
MD5 2e3e9871b92d0b4cce50a2dbdf7be4f0
BLAKE2b-256 3c6027f18720dee2c004cb92ade1bc406083d46a64dd83c6936ddc7342c1ba71

See more details on using hashes here.

File details

Details for the file esrf_loadfile-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: esrf_loadfile-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for esrf_loadfile-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9db1ee05f7345c183d6b8c0d14e4012cc66203a53e64de18c3b918e4a806b9b3
MD5 ba8994b4f3f64a16be42103b26c64f98
BLAKE2b-256 4a3211260c81e6ceaca9e95b8939429891d8214198005295519dc148706f2937

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page