Skip to main content

esrf-loadfile

GitLab Repo

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

Mamba environment

module load mamba  # on ESRF systems
mamba create -n esrf_loadfile -c conda-forge python pip setuptools
mamba activate esrf_loadfile
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

Metadata

Release files for esrf-loadfile 0.2.3

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

Source distribution (sdist)

Source distribution for esrf-loadfile 0.2.3
File Size Uploaded Provenance Actions
esrf_loadfile-0.2.3.tar.gz 25.5 kB Without provenance Details for esrf_loadfile-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for esrf-loadfile 0.2.3
File Interpreter ABI Platform Actions
esrf_loadfile-0.2.3-py3-none-any.whl Python 3 none any Details for esrf_loadfile-0.2.3-py3-none-any.whl

Total release size: 49.2 kB

Release files / esrf_loadfile-0.2.3.tar.gz

Download URL esrf_loadfile-0.2.3.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d6ce890bce9af7b8f121c961fc424902d1faa81947496e835401164aec10674
BLAKE2b-256 checksum
How to use checksums
78fffc13840027735f8cf3e212a8f8be86988939676de66f563c385095dc67e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / esrf_loadfile-0.2.3-py3-none-any.whl

Download URL esrf_loadfile-0.2.3-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24100c766b52083fe5ebc68d4a03a8752908ce1fca11f6f4e1b2d0f82bf3b077
BLAKE2b-256 checksum
How to use checksums
1c5cfe35efc56bcb2db7908b8d30c7013935e0fa16b329a12ccad04fd693d216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for esrf-loadfile 0.2.3

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.

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