API Reference

The API reference below is generated automatically from the public spectral_unmixing package and its docstrings.

Top-level package

Spectral unmixing utilities for microscopy stacks.

Author: Fabrizio Musacchio Date: June 2026

Public API overview

unmix(input_path, output_path[, alpha, ...])

Remove bleed-through from one source channel into one target channel in a TZCYX stack.

unmix_picasso(input_path[, output_path, ...])

Perform PICASSO-family multi-channel blind unmixing.

unmix_ch0_from_ch1(*args, **kwargs)

Backward-compatible wrapper for older code paths.

estimate_alpha_from_volume(source, target[, ...])

Estimate a bleed-through coefficient alpha from matching source and target volumes.

estimate_picasso_unmixing_matrix_from_volume(...)

Estimate a PICASSO-like blind unmixing matrix from multi-channel image data.

prepare_source_target_for_alpha(...[, ...])

Convert, optionally background-correct, and clip source and target volumes.

make_alpha_mask(source[, target, ...])

Create a robust mask for alpha estimation.

mutual_information_1d(x, y[, bins])

Estimate mutual information between two 1D intensity arrays using a 2D histogram.

apply_filters(stack, filters, *[, ...])

Apply one or more filters to a microscopy stack.

match_histograms_across_time(stack, *[, ...])

Match each time point to a reference time point using per-channel histogram matching.

max_z_project(stack, *[, zrange])

Compute a maximum-intensity projection over the Z axis while preserving T and C.

register_stack(stack, *, registration_channel)

Register a TZCYX stack across time using shifts estimated from Z projections.

correct_intra_stack_z_drift(stack, *[, ...])

Correct XY drift between Z slices within each time point of a TZCYX stack.

show_unmixed_channels_in_napari(output_path, *)

Show source and corrected target channel from an unmixed stack in a shared napari viewer.

show_all_channels_in_napari(stack_path, *[, ...])

Show every channel of a canonical TZCYX stack as a separate napari layer.

convert_time_encoded_stack_to_channel_stack(...)

Convert a TZCYX stack with T>1 and C=1 into T=1 and C=T.

report_path_from_output_path(output_path)

Return the JSON sidecar path used for reproducibility metadata.

DEFAULT_COLORMAPS

Built-in mutable sequence.