MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
334 stars 239 forks source link

ROI information in suite2p numpy array? #1038

Closed Eddymorphling closed 8 months ago

Eddymorphling commented 10 months ago

Hi, I have been using the Cellpose model to extract cells and analyze Calcium spikes using Suite2p.

I am using the "Top 40" cells to extract cells based on the skewness factor in Suite2P. My question is - once the top 40 cells are selected, is there a way to retrieve the ROI information for these cells from the numpy array in Suite2P (highlighted in red in the attached image). Is this possible? Thank you.

Untitled

chriski777 commented 8 months ago

Hi @Eddymorphling, I believe this information should be available in the stat.npy associated with this dataset.

stat = np.load('stat.npy')
stat[n] # n here can be anyone of the numbers highlighted in red and you can get the ROI information.

You can find what the keys in the stat dictionary mean here. Feel free to reopen the issue if you run into any other problems.