End-to-End CNMF-E¶
This tool uses 2.0 compute credits per hour.
The CNMF-E algorithm attempts to automatically identify the spatial location of cells in the input movie and their associated activity. Shown below is a diagram illustrating the workflow:
Inputs¶
Parameter | Required? | Default | Description |
---|---|---|---|
Input Movie Files | True | N/A | path to the input isxd movie files |
Temporal Downsample Factor | True | 2 | Factor by which the movie is to be temporally downsampled |
Spatial Downsample Factor | True | 2 | Factor by which the movie is to be spatially downsampled |
Reference Image | False | N/A | path to the reference image |
Cropping Vertices | False | N/A | A list of 4 values representing the coordinates of the top-left corner, width, and height of the area to crop: [top_left_x, top_left_y, width, height]. |
Fix Defective Pixels | True | True | If True, check for defective pixels and correct them |
Trim Early Frames | True | True | If True, remove early frames that are usually dark or dim |
Low Cutoff | False | 0.005 | Low cutoff frequency of the spatial filter. If left blank, no low cutoff frequency is used |
High Cutoff | False | 0.5 | High cutoff frequency of the spatial filter. If left blank, no high cutoff frequency is used |
Retain Mean | True | False | If True, retain the mean pixel intensity for each frame (the DC component) |
Subtract Global Minimum | True | True | If True, each frame is subtracted from the global minimum pixel intensity computed across the entire movie. By doing this, all pixel intensities will stay positive valued |
Max Translation | True | 20 | The maximum translation allowed by motion correction in pixels. |
Low Bandpass Cutoff | False | N/A | Boolean values; If not None, the low cutoff of the spatial filter is applied to each frame prior to motion estimation |
High Bandpass Cutoff | False | N/A | If not None, the high cutoff of the spatial filter is applied to each frame prior to motion estimation |
ROI | False | N/A | ROI vertices for motion estimation. Input should be a Nx2 array enclosed within a string, where N is the number of vertices. For example “[[23,45],[34,95],[120,234],[250,334]]”. The (0,0) coordinate is the top-left corner of the input movie. If input is empty, the algorithm will use the entire frame |
Global Registration Weight | True | 1 | When set to 1, only the reference frame is used for motion estimation. When less than 1, the previous frame is also used for motion estimation. The closer to 0, the more the previous frame is used and the less the reference frame is used. |
Cell Diameter | True | 7 | Average cell diameter of a representative cell in pixels |
Minimum Correlation | True | 0.8 | Minimum correlation of a pixel with its immediate neighbors when searching for new cell centers |
Minimum Peak-to-Noise Ratio | True | 10 | Minimum peak-to-noise ratio of a pixel when searching for new cell centers. |
Background Spatial Subsampling | True | 2 | Spatial downsampling factor to use when estimating the background activity |
Ring Size Factor | True | 1.4 | Multiple of the average cell diameter to use for computing the radius of the ring model used for estimating the background activity |
Gaussian Kernel Size | True | 0 | Width in pixels of the Gaussian kernel used for spatial filtering of the movie before cell initialization (automatically estimated when the value provided is smaller than 3) |
Closing Kernel Size | True | 0 | Size in pixels of the morphological closing kernel used for removing small disconnected components and connecting small cracks within individual cell footprints (automatically estimated when the value provided is smaller than 3) |
Merge Threshold | True | 0.7 | Temporal correlation threshold for merging cells that are spatially close |
Processing Mode | True | parallel_patches | Processing mode for CNMF-E |
Number of Threads | True | 4 | Number of threads to be used for running the CNMF-E algorithm |
Patch Size | True | 80 | Side length of an individual square patch within the field of view in pixels |
Patch Overlap | True | 20 | Amount of overlap between adjacent patches in pixels |
Output Unit Type | True | df_over_noise | Units of the output temporal traces |
Threshold | True | 5 | The threshold in median-absolute-deviations that the trace has to cross to be considered an event. |
Tau | True | 0.3 | The minimum time in seconds that an event has to last in order to be considered. |
Event Time Reference | True | beginning | The temporal reference that defines the event time. |
Ignore Negative Transients | True | True | A boolean parameter that dictates whether to include or exclude negative transients for event detection |
File Inputs¶
Source Parameter | File Type | File Format |
---|---|---|
Input Movie Files | miniscope_movie | isxd |
Reference Image | miniscope_image | isxd |
Recommended Workflow¶
The workflow leading up to CNMF-E is similar, but not identical to PCA-ICA. We recommend the following processing stages prior to running:
Preprocess¶
We recommend that data be downsampled temporally to 10 Hz or below and spatially downsampled by a factor of 2 to 4. The current implementation of CNMF-E performs deconvolution of temporal dynamics using the OASIS algorithm with an autoregressive model of order 1, which is appropriate for data recorded at up to 10 Hz. Higher-frequency data may not be adequately deconvolved using low-order models in noisy regimes. Spatial downsampling of the data will help blur away minor spatial fluctuations and significantly reduce processing time and memory usage.
Spatial Bandpass Filter¶
We recommend that you apply our usual recommendation of spatial bandpass filtering with global mean subtraction.
Motion Correct¶
No changes to the typical settings are necessary for motion correction when using CNMF-E.