Metadata-Version: 2.5
Name: vibframe-anndata
Version: 0.2.2
Summary: Reproducible VibFrame ingestion and incremental AnnData feature engineering.
Project-URL: Repository, https://github.com/413hq/VibFrame_To_Anndata
Project-URL: Documentation, https://413hq.github.io/vibframe-anndata-docs/
Project-URL: Changelog, https://413hq.github.io/vibframe-anndata-docs/latest/reference/changelog/
Project-URL: Issues, https://github.com/413hq/VibFrame_To_Anndata/issues
Author: Alejandro González Zapico
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: anndata,condition-monitoring,machine-learning,signal-processing,vibration
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: anndata<0.13,>=0.10
Requires-Dist: awkward<3,>=2.5
Requires-Dist: numpy<3,>=1.26
Requires-Dist: pandas<3,>=2.0
Requires-Dist: pyarrow<26,>=14
Requires-Dist: pyyaml<7,>=6
Requires-Dist: scipy<2,>=1.11
Provides-Extra: dev
Requires-Dist: psutil<8,>=6; extra == 'dev'
Requires-Dist: pylint<4,>=3.2; extra == 'dev'
Requires-Dist: pytest-cov<7,>=5; extra == 'dev'
Requires-Dist: pytest<9,>=8; extra == 'dev'
Requires-Dist: ruff<1,>=0.6; extra == 'dev'
Provides-Extra: release
Requires-Dist: build<2,>=1.2; extra == 'release'
Requires-Dist: tomli<3,>=2; (python_version < '3.11') and extra == 'release'
Requires-Dist: twine<8,>=7; extra == 'release'
Description-Content-Type: text/markdown

# VibFrame to AnnData

Python package for staged conversion of TWave VibFrame data into reusable `AnnData` datasets.

> Public user and API documentation: https://413hq.github.io/vibframe-anndata-docs/

The workflow is intentionally split in two phases:

1. **Ingest raw VibFrame data once** into an AnnData base (`obs`, `obsm`, `uns`).
2. **Add, recalculate or remove features** from the raw signals already stored in AnnData, without reopening the original VibFrame.

For datasets that fit comfortably in memory:

```python
from vibframe_anndata import add_features, import_raw, remove_features, write_h5ad

adata = import_raw("dataset.vibframe.zip")
write_h5ad(adata, "dataset_raw.h5ad")

adata = add_features(
    adata,
    {
        "version": 1,
        "features": [
            {"name": "rms", "source": "waveform"},
            {"name": "kurtosis", "source": "waveform"},
        ],
    },
)

adata = remove_features(adata, ["kurtosis"])
write_h5ad(adata, "dataset_features.h5ad")
```

Snapshot-level evaluation labels under `evaluation/snapshot_truth/` can be carried into
`obsm["ground_truth"]` without exposing them as model features:

```python
adata = import_raw(
    "dataset.vibframe.zip",
    config={"version": 1, "ground_truth": {"enabled": True, "on_missing": "error"}},
)
```

For datasets larger than RAM, use the blockwise H5AD APIs:

```python
from vibframe_anndata import import_raw_to_h5ad, add_features_to_h5ad

base = import_raw_to_h5ad(
    "dataset.vibframe.zip",
    "dataset_raw.h5ad",
    config={
        "version": 1,
        "raw_import": {"on_missing_signal": "nan"},
        "ground_truth": {"enabled": True, "on_missing": "error"},
        "output": {"dtype": "float32"},
    },
    block_size_mib=8,
)

add_features_to_h5ad(
    base,
    {
        "version": 1,
        "output": {"dtype": "float32"},
        "feature_policy": {"on_error": "nan"},
        "features": [{"name": "rms", "source": "waveform"}],
    },
    output="dataset_features.h5ad",
    block_rows=256,
)
```

The large-file path is transactional: raw samples are read in observation blocks and the destination is replaced only after all feature blocks succeed.

Install from PyPI:

```bash
python -m pip install vibframe-anndata
```

Install for development:

```bash
python -m pip install -e ".[dev]"
```

The repository intentionally does **not** version the project `data/` directory. The mandatory CI fixture is generated deterministically from versioned synthetic source.

## License

The software package is released under the **BSD 3-Clause License**, allowing academic and research users to inspect, modify and redistribute the code while retaining the copyright and license notices.

The BSD license applies to the software source code distributed by this project. External or reference datasets, VibFrame captures and other third-party material are **not** relicensed by this repository unless explicitly stated. Release archives exclude VibFrame reference binaries and the local `data/` tree.

## Documentation

User-facing and API documentation is published independently of this repository and versioned with package releases:

- Public documentation: https://413hq.github.io/vibframe-anndata-docs/
- Versioned API reference: https://413hq.github.io/vibframe-anndata-docs/latest/reference/api/
- Known limitations: https://413hq.github.io/vibframe-anndata-docs/latest/reference/limitations/

Internal development, architecture, benchmark and requirements documentation remains under `docs/` in this repository.
