Metadata-Version: 2.4
Name: toolsandogh
Version: 0.5.4
Summary: A collection of Python scripts for iSCAT microscopy data analysis
Author-email: Marco Heisig <marco.heisig@mpl.mpg.de>
License-Expression: GPL-3.0-or-later
Project-URL: Repository, https://github.com/SandoghdarLab/toolsandogh
Project-URL: Issues, https://github.com/SandoghdarLab/toolsandogh/issues
Keywords: tools,utilities,python,microscopy
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bioio>=3.4
Requires-Dist: bioio-dv>=1.2
Requires-Dist: bioio-imageio>=1.3
Requires-Dist: bioio-lif>=1.3
Requires-Dist: bioio-nd2>=2.0
Requires-Dist: bioio-ome-tiff>=1.4
Requires-Dist: bioio-ome-zarr>=3.5
Requires-Dist: bioio-tifffile>=1.3
Requires-Dist: bioio-tiff-glob>=1.2
Requires-Dist: dask>=2026.1
Requires-Dist: fsspec>=2025.3
Requires-Dist: imageio[ffmpeg]>=2.37
Requires-Dist: imgrvt>=1.0
Requires-Dist: jax>=0.10.2
Requires-Dist: jaxtyping>=0.3
Requires-Dist: numpy>=2.3
Requires-Dist: ome-types>=0.6
Requires-Dist: polars>=1.0
Requires-Dist: pyarrow>=22.0
Requires-Dist: scikit-image>=0.23
Requires-Dist: scipy>=1.17
Requires-Dist: tifffile>=2026.5
Requires-Dist: tqdm>=4.66
Requires-Dist: xarray>=2026.1
Dynamic: license-file

# toolsandogh

A Python toolbox for iSCAT microscopy data analysis, developed by the Sandoghdar Division of the Max Planck Institute for the Science of Light (MPL).

## Overview

`toolsandogh` provides a small, reusable library for loading, processing, analyzing, and storing microscopy videos.  It is designed around a canonical 5D data model---`T` (time), `C` (channel), `Z` (slice), `Y` (row), `X` (column)---implemented as lazy [xarray](https://docs.xarray.dev/) arrays backed by [Dask](https://www.dask.org/).

## Features

- **Lazy, out-of-core computation**: Videos are kept as Dask arrays so you can work with datasets larger than memory.
- **Labeled, metadata-rich arrays**: Results are `xarray.DataArray` objects with `TCZYX` dimensions and OME metadata.
- **Multiple microscopy formats**: Read and write RAW/BIN, TIFF, OME-TIFF, OME-Zarr, ND2, and other formats supported by [bioio](https://github.com/bioio-devs/bioio).
- **Reusable analysis primitives**: Rolling statistics, radial variance transform, synthetic data generation, and more.

## Installation

This project uses the [uv package manager](https://docs.astral.sh/uv/).  Clone the repository and run:

```bash
uv sync
```

To install in editable mode for development:

```bash
uv pip install -e ".[dev]"
```

## Quick start

```python
import toolsandogh as sand

# Load a video (any bioio-supported format or raw BIN/RAW file).
video = sand.load_video("movie.nd2")

# Apply a rolling average along the time axis.
smoothed = sand.rolling_average(video, window_size=5, dim="T")

# Save the result back to disk.
sand.store_video(smoothed, "smoothed.ome.tiff")
```

Use `help(sand.load_video)` or `help(sand.store_video)` for details on the available arguments.

## Repository layout

- `src/toolsandogh/` --- the main Python package.
- `src/toolsandogh/tests/` --- `pytest` test suite.
- `DESIGN.md` --- design conventions and coding standards.

## Contributing

Please see `DESIGN.md` for coding conventions, documentation standards, and architecture decisions.  In brief:

- All public functions must be type-hinted and documented in numpydoc style.
- Code is linted with `ruff` and type-checked with `pyright`.
- Prefer free functions; keep data in `xarray.DataArray`/`Dataset` form.
- Tests go in `src/toolsandogh/tests/`.

## License

GPL-3.0-or-later.
