A non-negative matrix factorization algorithm for demixing calcium imaging data. The user can specify initial values for the structural and temporal components; in particular structural components can be initialized with an anatomical segmentation. Spatial component learning can be regularized to stay as close as you like to the prior initialization. Distributed functions are available for large datasets, small crops defined by the initial segmentation are run in parallel on distributed hardware.
Four example panels; for each panel:
Upper left: raw data
Upper right: mean of raw data over time
Lower left: NMF reconstruction (space_components @ time_components)
Lower right: residual (raw - reconstruction)
Currently only from source but will be on PyPI in the near future.