Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 7, 2024
1 parent 49d377a commit 7e35190
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/roiextractors/extractors/minian/miniansegmentationextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ def __init__(self, folder_path: PathType):
"""
SegmentationExtractor.__init__(self)
self.folder_path = folder_path
self._roi_response_denoised = self._trace_extractor_read(field = "C")
self._roi_response_baseline = self._trace_extractor_read(field = "b0")
self._roi_response_neuropil = self._trace_extractor_read(field = "f")
self._roi_response_deconvolved = self._trace_extractor_read(field = "S")
self._roi_response_denoised = self._trace_extractor_read(field="C")
self._roi_response_baseline = self._trace_extractor_read(field="b0")
self._roi_response_neuropil = self._trace_extractor_read(field="f")
self._roi_response_deconvolved = self._trace_extractor_read(field="S")
self._image_maximum_projection = self._file_extractor_read("/max_proj.zarr/max_proj")
self._image_masks = self._roi_image_mask_read()
self._background_image_masks = self._background_image_mask_read()


def _file_extractor_read(self, zarr_group = ""):
def _file_extractor_read(self, zarr_group=""):
"""Read the zarr.
Returns
Expand All @@ -73,7 +72,7 @@ def _roi_image_mask_read(self):
if dataset is None or "A" not in dataset:
return None
else:
return np.transpose(dataset["A"], (1,2,0))
return np.transpose(dataset["A"], (1, 2, 0))

def _background_image_mask_read(self):
"""Read the image masks from the zarr output.
Expand Down Expand Up @@ -167,4 +166,8 @@ def get_images_dict(self) -> dict:
dictionary with key, values representing different types of Images used in segmentation:
Mean, Correlation image
"""
return dict(mean=self._image_mean, correlation=self._image_correlation, maximum_projection=self._image_maximum_projection)
return dict(
mean=self._image_mean,
correlation=self._image_correlation,
maximum_projection=self._image_maximum_projection,
)

0 comments on commit 7e35190

Please sign in to comment.