Skip to content

Commit

Permalink
docstring and name correction
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Oct 17, 2024
1 parent 9e9dfcf commit d4bc98d
Showing 1 changed file with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,43 @@
from ...extraction_tools import PathType, DtypeType, get_package


class MiniscopeMultiSegmentExtractor(MultiImagingExtractor):
"""An ImagingExtractor for the Miniscope video (.avi) format.
This format consists of video (.avi) file(s) and configuration files (.json).
One _MiniscopeSingleVideoExtractor is created for each video file and then combined into the MiniscopeImagingExtractor.
class MiniscopeMultiRecordingImagingExtractor(MultiImagingExtractor):
"""
ImagingExtractor processes multiple separate Miniscope recordings within the same session.
Important, this extractor consolidates the recordings as a single continuous dataset.
Expected directory structure:
.
├── C6-J588_Disc5
│ ├── 15_03_28 (timestamp)
│ │ ├── BehavCam_2
│ │ ├── metaData.json
│ │ └── Miniscope
│ ├── 15_06_28 (timestamp)
│ │ ├── BehavCam_2
│ │ ├── metaData.json
│ │ └── Miniscope
│ └── 15_07_58 (timestamp)
│ ├── BehavCam_2
│ ├── metaData.json
│ └── Miniscope
└──
Where the Miniscope folders contain a collection of .avi files and a metaData.json file.
For each video file, a _MiniscopeSingleVideoExtractor is created. These individual extractors
are then combined into the MiniscopeMultiRecordingImagingExtractor to handle the session's recordings
as a unified, continuous dataset.
"""

extractor_name = "MiniscopeMultiImaging"
is_writable = True
mode = "folder"

def __init__(self, folder_path: PathType):
"""Create a MiniscopeImagingExtractor instance from a folder path.
"""Create a MiniscopeMultiRecordingImagingExtractor instance from a folder path.
Parameters
----------
Expand Down Expand Up @@ -65,15 +89,15 @@ def __init__(self, folder_path: PathType):
super().__init__(imaging_extractors=imaging_extractors)


# Temporal renaming to keep backwards compatibility
MiniscopeImagingExtractor = MiniscopeMultiSegmentExtractor
# Temporary renaming to keep backwards compatibility
MiniscopeImagingExtractor = MiniscopeMultiRecordingImagingExtractor


class _MiniscopeSingleVideoExtractor(ImagingExtractor):
"""An auxiliar extractor to get data from a single Miniscope video (.avi) file.
This format consists of a single video (.avi)
Multiple _MiniscopeSingleVideoExtractor are combined into the MiniscopeImagingExtractor for public access.
Multiple _MiniscopeSingleVideoExtractor are combined by downstream extractors to extract the data
"""

extractor_name = "_MiniscopeSingleVideo"
Expand Down

0 comments on commit d4bc98d

Please sign in to comment.