Metadata-Version: 2.4
Name: sitelab
Version: 0.0.1
Summary: SITE microscopy ingestion, metadata, visualization, and analysis platform.
Author: Davies Cancer Lab
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2
Provides-Extra: nd2
Requires-Dist: nd2>=0.10; extra == "nd2"
Requires-Dist: dask[array]>=2024; extra == "nd2"
Requires-Dist: xarray>=2024; extra == "nd2"
Provides-Extra: viewer
Requires-Dist: napari[all]>=0.5; extra == "viewer"
Requires-Dist: magicgui>=0.9; extra == "viewer"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# sitelab

Early refactor scaffold for the Serial Imaging of Tumor and microEnvironment
platform.

This package is intentionally small at first. Its first job is to make raw
microscopy data inspectable and to capture channel meaning in a human-readable
manifest before downstream analysis starts.

## First milestone

- Inspect an `.nd2` file without loading the full image into memory.
- Extract axes, sizes, voxel/time metadata, and raw channel names when available.
- Create a project manifest that maps raw channels to biological roles.
- Launch a napari viewer from the same backend manifest.

## Install in a scientific Python environment

The Codex runtime used for editing may not include microscopy/GUI libraries.
Install this package in the environment where you run napari and analysis:

```powershell
cd path\to\sitelab
python -m pip install -e ".[nd2,viewer]"
```

For backend-only schema work:

```powershell
python -m pip install -e .
```

## Inspect an ND2 file

```powershell
python -m sitelab inspect-nd2 `
  "..\..\data_sample\T2_40X_sample20260513_crop.nd2" `
  --out "..\..\data_sample\T2_40X_sample20260513_crop.site.json"
```

The output manifest is deliberately editable JSON. The first generated channel
labels are placeholders; users should define biological meanings such as
`tumor_reporter`, `macrophages`, `lymphoid`, `nuclear_label`, or
`brightfield_context`.

## Launch napari

```powershell
python -m sitelab view-nd2 `
  "..\..\data_sample\T2_40X_sample20260513_crop.nd2" `
  --manifest "..\..\data_sample\T2_40X_sample20260513_crop.site.json"
```

This is the beginning of the hybrid GUI/scripting platform: the GUI should call
the same importable Python objects that scripts, notebooks, and batch workflows
use.
