Skip to content

Commit

Permalink
Extract roi indices from redcell.npy in Suite2pExtractor (#270)
Browse files Browse the repository at this point in the history
* extract roi indices from redcell.npy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Cody Baker <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2024
1 parent c1e44ff commit bd18e5b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ def __init__(
self._load_npy(file_name="spks.npy", mmap_mode="r", transpose=True) if channel_name == "chan1" else None
)

self.iscell = self._load_npy("iscell.npy", mmap_mode="r")
# rois segmented from the iamging acquired with second channel (red/anatomical) that match the first channel segmentation
redcell = self._load_npy(file_name="redcell.npy", mmap_mode="r")
if channel_name == "chan2" and redcell is not None:
self.iscell = redcell
else:
self.iscell = self._load_npy("iscell.npy", mmap_mode="r")

# The name of the OpticalChannel object is "OpticalChannel" if there is only one channel, otherwise it is
# "Chan1" or "Chan2".
Expand Down

0 comments on commit bd18e5b

Please sign in to comment.