Metadata-Version: 2.4
Name: agilent-decode
Version: 0.1.0
Summary: Read Agilent CDS DAD data from .dx archives.
Author: Han
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.23

# agilent-decode

Python package for extracting Agilent CDS DAD data from `.dx` archives.

## Installation

From repository root:

```bash
pip install .
```

For editable install during development:

```bash
pip install -e .
```

## Package usage

```python
from pathlib import Path
from agilent_decode import CDSExtractor

reader = CDSExtractor()
intensities, time_slices, wavelengths = reader.extract_dad(Path("sample_data.dx"))
```

- `intensities`: 2D numpy array shaped `(n_scans, n_wavelengths)`
- `time_slices`: 1D numpy array of scan times in minutes
- `wavelengths`: 1D numpy array of wavelengths in nm

## Demo script

`demo/demo.py` reproduces the old `if __name__ == "__main__"` workflow but writes decoded data to `.npz` instead of printing values.

Run:

```bash
python demo/demo.py sample_data.dx -o decoded_output.npz
```

Saved fields in the `.npz`:

- `intensities`
- `time_slices`
- `wavelengths`

## Project layout

- `src/agilent_decode/`: installable package source
- `demo/demo.py`: command-line demo script
- `data/`: sample assets
