> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biom.science/llms.txt
> Use this file to discover all available pages before exploring further.

# Suite2p — Calcium Imaging

> ROI detection, motion correction, and spike deconvolution for two-photon imaging.

# Suite2p

Suite2p is a pipeline for processing two-photon calcium imaging data. It handles motion correction, ROI (cell) detection, fluorescence extraction, neuropil subtraction, and spike deconvolution.

## Input formats

`.tiff`, `.h5`, `.hdf5`, `.sbx`, `.nd2`, `.raw`

## Parameters

| Parameter               | Range             | Default       | Description                               |
| ----------------------- | ----------------- | ------------- | ----------------------------------------- |
| **nplanes**             | 1–100             | 1             | Number of imaging planes                  |
| **nchannels**           | 1–4               | 1             | Number of channels                        |
| **Functional channel**  | 1–4               | 1             | Channel to use for cell detection         |
| **Frame rate**          | Float             | Auto-detected | Imaging frame rate (Hz)                   |
| **Motion correction**   | rigid / non-rigid | rigid         | Type of motion correction                 |
| **Block size**          | \[Int, Int]       | \[128, 128]   | Block size for non-rigid correction       |
| **Gaussian smoothing**  | Float             | 0             | Smoothing sigma for cell detection        |
| **Cell diameter**       | Integer           | 0 (auto)      | Expected cell diameter in pixels          |
| **Detection threshold** | 0.1–5             | 1.0           | Scaling factor for detection sensitivity  |
| **Sparse mode**         | Toggle            | Off           | Better for sparse recordings              |
| **Overlapping ROIs**    | Toggle            | Off           | Allow ROIs to overlap                     |
| **Spike deconvolution** | Toggle            | On            | Deconvolve calcium transients to spikes   |
| **Indicator tau**       | 0.1–10            | 1.0           | Calcium indicator time constant (seconds) |
| **MATLAB export**       | Toggle            | Off           | Export results in MATLAB format           |
| **Combined planes**     | Toggle            | Off           | Combine ROIs across planes                |

## Outputs

| Output               | Format | Description                           |
| -------------------- | ------ | ------------------------------------- |
| Cell statistics      | NPY    | ROI shapes, positions, and properties |
| ROI map              | NPY    | Spatial footprints of detected cells  |
| Raw fluorescence (F) | NPY    | Raw fluorescence traces per cell      |
| Neuropil (Fneu)      | NPY    | Neuropil contamination traces         |
| Deconvolved spikes   | NPY    | Estimated spike trains                |
| Cell classification  | NPY    | Classifier labels (cell vs. not-cell) |
| Registered movie     | BIN    | Motion-corrected movie (optional)     |

## Presets

| Preset              | Description                                 |
| ------------------- | ------------------------------------------- |
| **Default**         | Standard settings for most recordings       |
| **Fast Processing** | Reduced accuracy for quick preview          |
| **Multi-plane**     | Configured for multi-plane imaging          |
| **Dense Labeling**  | Lower threshold for densely labeled samples |

## Compute requirements

| Resource | Requirement                                     |
| -------- | ----------------------------------------------- |
| GPU      | A10G or A100 for large datasets (8–14+ GB VRAM) |
| Duration | \~600 seconds baseline                          |
