lima2mxh5master
lima2mxh5master creates, updates, and inspects NeXus/HDF5 master files for
macromolecular crystallography workflows.
The project is currently in beta. Schema documents declare their specification version and whether they create or update a file; bundled transformation profiles also carry their own name and version.
Installation
Python 3.10 or newer is required.
python -m pip install lima2mxh5master
For a development checkout:
python -m pip install -e .
Create a file
from lima2mxh5master.api import dump_dict_to_nx
create_schema = {
"spec_version": 1,
"operation": "create",
"registry": {"source_dir": [], "classes": {}},
"schema": {
"entry": {
"@NX_class": "NXentry",
"title": "Example scan",
"data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
}
},
}
dump_dict_to_nx(create_schema, "master.h5")
Update a file
from lima2mxh5master.api import update_h5_from_dict
update_schema = {
"spec_version": 1,
"operation": "update",
"registry": {"source_dir": [], "classes": {}},
"schema": {
"entry": {
">=sampled": "${h5:self:/entry/data}[::10]",
}
},
}
update_h5_from_dict(
update_schema,
path_h5_base_file="master.h5",
path_h5_output_file="sampled_master.h5",
)
${h5:self:/entry/data} explicitly reads the original base file;
${h5:/entry/data} is the equivalent shorthand. Schemas can also declare named
external inputs and reference them as ${h5:source_name:/entry/data} in create
or update operations. Literal inputs use
${h5:<../raw/data.h5>:/entry/data}, and vds.concatenate([...], axis=0)
combines sliced HDF5 references into a virtual dataset without reading frame
data.
See the full documentation for schema syntax, in-place updates, deletions, HDF5 references, and bundled profiles.
Metadata
Release files for lima2mxh5master 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lima2mxh5master-1.0.0.tar.gz | 73.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lima2mxh5master-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 152.9 kB
Release files / lima2mxh5master-1.0.0.tar.gz
| Download URL | lima2mxh5master-1.0.0.tar.gz |
|---|---|
| Size | 73.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e35b2f54c14f1b356fdb283ba6544e622f3f72b21e0f4d17ba30b5e420165d5
|
|
BLAKE2b-256 checksum How to use checksums |
5a1fcbdb86d7dd91390fce42352923db5acd16f23ea3a72ca86b95977e430cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / lima2mxh5master-1.0.0-py3-none-any.whl
| Download URL | lima2mxh5master-1.0.0-py3-none-any.whl |
|---|---|
| Size | 79.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d901cd62a7ae95604ef12f4141b0adbb7d5b09f1d4a428cd7107a79d6b338432
|
|
BLAKE2b-256 checksum How to use checksums |
39e7a5673d60e1e40bd8a79ba702d4761be0017177cdbf0a1bd8ca19613fffcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|