This repo is an early version of https://github.com/paninski-lab/funimag. Check funimag repo for latest code.
The whole pipeline is as follows:
- Threshold data to increase SNR.
- Correlation analysis to find out superpixels.
- Rank-1 svd to extract the temporal trace of superpixels.
- Successive Projection Algorithm to find pure superpixel.
- NMF with temporal trace and spatial support of pure superpixels as initialization to extract neurons and their activities.
See Demo_superpixel_pipeline.ipynb on example data. This example data is from https://github.com/simonsfoundation/CaImAn.
See more demos on different datasets in other .ipynb files.
- Run in python3.6.
- Recommend running PMD then using the default parameters in demix function first. Note the parameters in demo have been tuned to adapt to the example data.
- Tuning parameters: i) See detailed description of each parameters in the comments of demix function. ii) cut_off_point and length_cut are two key parameters which may need to tune in superpixel initialization. corr_th_fix is another parameter which may need to tune in following NMF step. Other parameters can generally take the default values.