AllenInstitute / neuroglia

a Python machine learning library for neurophysiology data
http://neuroglia.readthedocs.io
BSD 3-Clause "New" or "Revised" License
36 stars 7 forks source link

Feature request: source extraction for calcium images #76

Open mpmbq2 opened 6 years ago

mpmbq2 commented 6 years ago

Currently neuroglia's calcium module works with extracted fluorescence traces. It would be useful to integrate the ability to extract fluorescence traces for downstream processing. This could look something like:

from dask.array.image import imread
from neuroglia.calcium import SourceExtraction

image = imread('image.tif')
se = SourceExtraction(method='some_method', *args, **kwargs)

fluorescence_traces = se.transform(image)

Some libraries already exist for this (SIMA, CaImAn, Thunder), but an integrated solution with a consistent API would allow for more efficient processing. Which algorithms to use and how to implement or wrap them are up for discussion. Dask is used in the example above because it would support both in-memory processing of small images and out-of-memory processing of large images, and because it integrates naturally with xarray for downstream analysis.

mochic commented 6 years ago

ill try to look into this when we have the repo in a more stable state what do you think @neuromusic ?