Processing Flow#
High-level overview of all processing steps executed by lsp.pipeline().
Registration#
Step |
Description |
Outputs |
Disable |
|---|---|---|---|
Rigid Registration |
Correct XY frame shifts via phase correlation |
|
|
Non-rigid Registration |
Correct local warping via block-wise shifts |
|
|
Compute meanImg |
Average all registered frames |
|
N/A |
Compute meanImgE |
Enhanced mean via spatial high-pass |
|
N/A |
Detection Preprocessing#
These steps are applied to the registered movie before ROI detection:
Step |
Description |
Affects |
Disable |
|---|---|---|---|
Temporal Binning |
Average consecutive frames to reduce noise |
Detection movie, |
|
Temporal High-Pass |
Remove slow baseline drift |
Detection movie, |
|
*The mbo fork allows disabling high_pass; standard Suite2p forces a value.
What each projection image contains#
Image |
Source |
Binned? |
Temporally HP filtered? |
|---|---|---|---|
|
Average of registered frames |
No |
No |
|
Spatial HP of meanImg |
No |
No |
|
Max of detection movie |
Yes |
Yes |
Detection: Anatomical Mode (Cellpose)#
When ops["anatomical_only"] > 0, cellpose segments one of these images:
Mode |
Input Image |
Description |
|---|---|---|
1 |
|
Log ratio emphasizes active regions |
2 |
|
Raw mean intensity |
3 |
|
Enhanced mean (spatial HP) |
4 |
|
Maximum projection (binned + temporal HP) |
Step |
Description |
Disable |
|---|---|---|
PCA Denoise |
Spatial denoising via block-wise PCA |
|
Spatial High-Pass (cellpose) |
Remove illumination gradients from input image |
|
Cellpose Segmentation |
Run Cellpose model on processed image |
N/A |
Note: spatial_hp_cp is applied to the image before cellpose but does NOT modify the stored ops["max_proj"] or ops["meanImg"].
Detection: Functional Mode#
When ops["anatomical_only"] = 0:
Step |
Description |
Disable |
Notes |
|---|---|---|---|
Spatial High-Pass |
High-pass filter for activity detection |
|
sparse only |
Compute Vcorr |
Activity correlation images |
N/A |
sparse only |
Seed Detection |
Find candidate ROI centers from peaks |
N/A |
sparse only |
ROI Growing |
Expand seeds based on correlation |
N/A |
sparse only |
SVD Decomposition |
Reduce dimensionality for source detection |
N/A |
sourcery only ( |
Source Detection |
Find ROIs via iterative NMF-like method |
N/A |
sourcery only |
ROI Overlap Removal |
Merge/remove overlapping ROIs |
|
all functional |
Post-Detection (All Modes)#
Step |
Description |
Disable |
|---|---|---|
Extract Fluorescence (F) |
Compute raw fluorescence from ROI pixels |
N/A |
Compute Neuropil (Fneu) |
Estimate neuropil signal from surround |
|
Classifier |
Apply ROI classifier (cell vs not-cell) |
|
Spike Deconvolution |
Infer spike times via OASIS |
|
Apply Filters |
Size/shape filters on detected ROIs |
|
lsp.pipeline() Additional Steps#
These are applied by lsp.pipeline() after suite2p completes:
Step |
Description |
Disable |
|---|---|---|
Accept All Cells |
Mark all suite2p-rejected ROIs as accepted |
|
Cell Filters |
Size/shape filters (default 4-35 µm diameter) |
|
Compute dF/F |
Rolling percentile baseline correction |
N/A |
Generate Figures |
Diagnostic plots for each plane |
N/A |
See also
User Guide - Complete processing examples and parameter tuning
Postprocessing - ΔF/F and filtering functions
Pipeline Comparison - CaImAn, Suite2p, EXTRACT comparison