Closed loganPasternak67854 closed 1 year ago
Hi @loganPasternak67854, n_cells
is determined during the classification step of the pipeline. One of the outputs of suite2p is iscell.npy
. This array will be of shape num_ROIs x 2
. The first column of this array specifies whether the identified ROI is considered a cell by the classifier used during runtime. You can find n_cells
by counting up how many of these ROIs have their first column value set to 1.
Closing this issue, @loganPasternak67854. Feel free to reopen this issue if you have any other questions!
Issue with current documentation:
Hello,
I've been trying to run the example image extraction code on the Output page of the suite2p website, but I'm having an issue where some of the image matrices have pixel values larger than 255 and look distorted. I'm figuring the issue has to do with how I define ncells. I'm not quite sure where ncells comes from in the example. I currently have ncells equal to stat.size. The version of the code I have is down bellow. Please let me know if there is something I'm missing.
Thanks
def extract_ROI(statPath,opsPath):
Idea or request for content:
How would one go about retrieving ncells? Is it a value that is retrieved from stat or ops. Example python code would be appreciated.