Metadata-Version: 2.4
Name: midas-zipper
Version: 0.1.1
Summary: Standalone zarr-zip generation for MIDAS FF/PF workflows (no C-binary or source-tree dependency).
Author-email: Hemant Sharma <hsharma@anl.gov>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/marinerhemant/MIDAS
Project-URL: Issues, https://github.com/marinerhemant/MIDAS/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.22
Requires-Dist: h5py>=3.0
Requires-Dist: zarr<3,>=2.13
Requires-Dist: numcodecs>=0.11
Requires-Dist: numba>=0.57
Requires-Dist: pillow>=9.0
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"

# midas-zipper

Standalone zarr-zip generation for MIDAS FF/PF workflows.

`pip install midas-zipper` works with **no MIDAS source tree and no compiled C
binaries** — it depends only on `numpy`, `h5py`, `zarr`, `numcodecs`, `numba`,
and `pillow`, plus the system `zip`/`bzip2` tools.

It packages the zarr ingest that the FF and PF pipelines need to turn raw
detector data (HDF5/GE/TIFF) into the `*.MIDAS.zip` files the rest of MIDAS
consumes — previously the source-tree script `utils/ffGenerateZipRefactor.py`,
which broke `pip`-only installs because it lived outside any package.

## CLI

```bash
# FF zarr-zip generation (formerly ffGenerateZipRefactor.py)
midas-ff-zip -resultFolder <dir> -paramFN <params.txt> -LayerNr <n>

# Update a key inside an existing Zarr.zip
midas-update-zarr -fn <file.MIDAS.zip> -keyToUpdate <key> -updatedValue <...>
```

Both are also runnable as modules:

```bash
python -m midas_zipper.ff_zip   -resultFolder ... -paramFN ... -LayerNr ...
python -m midas_zipper.update_zarr -fn ... -keyToUpdate ... -updatedValue ...
```

## Python API

```python
from midas_zipper import generate_ff_zip

generate_ff_zip(
    result_folder="/path/to/scan",
    param_file="/path/to/Parameters.txt",
    layer_nr=1,
)
```

## Scope

This package intentionally **excludes** `AutoCalibrateZarr.py`: that tool drives
the C/OpenMP calibration binaries (`CalibrantPanelShiftsOMP`,
`CalibrantIntegratorOMP`, `GetHKLList`) and so cannot be pip-portable. It stays
with the calibration workflow.
