Usage
This section documents the practical, script-based usage model of
spectral-unmixing.
The package is designed to be driven from project-specific Python scripts that
can be executed cell by cell in the VS Code interactive window or a similar
notebook-like environment. The reusable package functions live in
spectral_unmixing/, while the repository’s user_scripts/ folder shows
how these functions are combined for real workflows.
- Example datasets
- Functionality overview
- Basic unmixing example
- Full 3D+t unmixing example
- Bidirectional unmixing example
- PICASSO 2-color example
- PICASSO 3-color example
- PICASSO 5-color example
- Filtering, registration, and projection helper example
- How to use this tutorial
- What this tutorial covers
- Imports
- Define input and output paths
- Load the stack
- Correct intra-stack z-drift
- Register the stack across time
- Match histograms across time
- Filter the registered stack
- Project along z
- Filter the projected stack again
- Save the processed stack
- Fine-tuning
How to read the tutorials
Each tutorial page is based on one interactive script from the
repository’s user_scripts/ folder. The documentation follows
the script cell by cell and explains:
what each cell does,
which parameters matter most,
what a user can modify for a new dataset,
and how those changes affect the unmixing result.
Recommended starting point
If you are new to the package, start in this order:
the PICASSO-family blind-unmixing tutorials
The standard two-channel tutorial introduces the core package logic with the
least complexity. The TZCYX tutorial then shows the same logic on
full time-lapse z-stacks. The helper tutorial then shows how filtering,
registration, histogram matching, and projection can be chained after
unmixing. The bidirectional tutorial adds a more advanced alpha-estimation
strategy for cases where the cross-talk is not strictly unidirectional. The
PICASSO tutorials build on the same ideas but add
blind coefficient estimation and multi-channel (more than two) configuration.