LBM-Suite2p-Python Documentation#

Volumetric 2-photon calcium imaging processing pipeline using Suite2p and Cellpose.

Primarily intended for Light Beads Microscopy (LBM) datasets, but viable with any planar or volumetric data.

Key capabilities:

  • Volumetric and/or Planar registration, detection, segmentation and deconvolution

  • Automatic detection and merging of ScanImage multi-ROI acquisitions

  • Post-processing filters for cell quality (area, eccentricity, event exceptionality)

  • ΔF/F calculation with multiple baseline methods

  • Volumetric statistics and Rastermap clustering

Quick Example#

import lbm_suite2p_python as lsp

# Process entire volume with the unified pipeline
results = lsp.pipeline(
    input_data="D:/data/raw",   # path to file, directory, or list of files
    save_path=None,             # default: save next to input
    ops=None,                   # default: use MBO-optimized parameters
    planes=None,                # default: process all planes
)

Helpful Suite2p Resources#

Topic

Resource

Description

Parameters

Suite2p Settings

Complete parameter reference

Detection

ROI Detection

Video overview of detection algorithm

Registration

Issue #921

Troubleshooting registration artifacts

Critical Parameters

Issue #129

Discussion of tau, threshold_scaling, diameter

ROI Overlap

Issue #851

Understanding max_overlap and allow_overlap

Fluorescence Signals

Issue #627

Explanation of F and Fneu outputs



Acknowledgements#

This pipeline is built on excellent open-source tools:

  • Suite2p - Registration and segmentation (Pachitariu, Stringer, et al.)

  • Cellpose - Anatomical segmentation (Stringer, Pachitariu, et al.)

  • Rastermap - Activity clustering (Stringer, Pachitariu)

  • Suite3D - Volumetric processing inspiration (Haydaroglu)

Special thanks to the Miller Brain Observatory team and all contributors for testing and feedback.