spectral_unmixing.max_z_project

spectral_unmixing.max_z_project(stack, *, zrange=None)[source]

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

Parameters:
  • stack (array-like) – Input stack in canonical TZCYX order, or a simpler ZYX / YX array.

  • zrange (tuple[int, int] or None, optional) – Optional half-open Z range (start, stop) used for the projection. If the provided bounds fall outside the stack, they are clamped to the valid Z extent. If None, the full Z range is used.

Return type:

ndarray

Returns:

np.ndarray – The returned stack stays in canonical TZCYX order with a singleton Z dimension.