input

Defines the import for different source filetypes.

source

FocusAreaPathRestrictions

 FocusAreaPathRestrictions ()

Initialize self. See help(type(self)) for accurate signature.

Source Data Handler:


source

Data

 Data (filepath:pathlib.Path, loaded_data:Any)

Helper class that provides a standard way to create an ABC using inheritance.


source

Recording

 Recording (filepath:pathlib.Path, loaded_data:Any)

Helper class that provides a standard way to create an ABC using inheritance.


source

ROI

 ROI (filepath:pathlib.Path, loaded_data:Any)

Helper class that provides a standard way to create an ABC using inheritance.

Source Data Loader:


source

DataLoader

 DataLoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

GridWrapperROILoader

 GridWrapperROILoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

RecordingLoader

 RecordingLoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

AVILoader

 AVILoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

NWBRecordingLoader

 NWBRecordingLoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

ROILoader

 ROILoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

ImageJROILoader

 ImageJROILoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.


source

NWBROILoader

 NWBROILoader (filepath:pathlib.Path)

Helper class that provides a standard way to create an ABC using inheritance.

Loader Factories


source

DataLoaderFactory

 DataLoaderFactory ()

Helper class that provides a standard way to create an ABC using inheritance.


source

RecordingLoaderFactory

 RecordingLoaderFactory ()

Helper class that provides a standard way to create an ABC using inheritance.


source

ROILoaderFactory

 ROILoaderFactory ()

Helper class that provides a standard way to create an ABC using inheritance.


source

get_filepaths_with_supported_extension_in_dirpath

 get_filepaths_with_supported_extension_in_dirpath (dirpath:pathlib.Path,
                                                    all_supported_extensio
                                                    ns:List[str], max_resu
                                                    lts:Optional[int]=None
                                                    )

source

RecLoaderROILoaderCombinator

 RecLoaderROILoaderCombinator (dir_path:pathlib.Path)

Initialize self. See help(type(self)) for accurate signature.

# Specification of filepaths that can be used for testing:

### ImageJ ROI filepaths:
valid_imagej_roi_filepath_1 = Path('../test_data/00/RoiSet_spiking.zip')
valid_imagej_roi_filepath_2 = Path('../test_data/00/focus_area/focus_spiking.roi')
### NWB ROI filepath:
valid_nwb_roi_filepath = Path('../test_data/02/spiking_neuron.nwb')

### AVI Recording filepath:
valid_avi_recording_filepath = Path('../test_data/00/spiking_neuron.avi')
### NWB Recording filepath:
valid_nwb_recording_filepath = Path('../test_data/02/spiking_neuron.nwb')

### A filepath of an unsupported file type:
unsupported_filepath = Path('../test_data/00/example_test_results_for_spiking_neuron/activity_overview.png')
roi_loader_factory = ROILoaderFactory()

# tests that the ROILoaderFactory returns the correct Loader subclass for the respective file types:
assert isinstance(roi_loader_factory.get_loader(valid_imagej_roi_filepath_1), ImageJROILoader)
assert isinstance(roi_loader_factory.get_loader(valid_imagej_roi_filepath_2), ImageJROILoader)
assert isinstance(roi_loader_factory.get_loader(valid_nwb_roi_filepath), NWBROILoader)

# tests that the ROILoaderFactory raises a NotImplementedError for an unsupported file type:
assert test_unsupported_file_extension(roi_loader_factory, unsupported_filepath)

# tests that the individual Loader subclass correctly loads and parses the file content into ROI instances:
assert test_successful_roi_loading(valid_imagej_roi_filepath_1)
assert test_successful_roi_loading(valid_imagej_roi_filepath_2)
assert test_successful_roi_loading(valid_nwb_roi_filepath)
recording_loader_factory = RecordingLoaderFactory()

# tests that the RecordingLoaderFactory returns the correct Loader subclass for the respective file types:
assert isinstance(recording_loader_factory.get_loader(valid_avi_recording_filepath), AVILoader)
assert isinstance(recording_loader_factory.get_loader(valid_nwb_recording_filepath), NWBRecordingLoader)

# tests that the RecordingLoaderFactory raises a NotImplementedError for an unsupported file type:
assert test_unsupported_file_extension(recording_loader_factory, unsupported_filepath)

# tests that the individual Loader subclass correctly loads and parses the file content into Recording instances:
assert test_successful_recording_loading(valid_avi_recording_filepath)
assert test_successful_recording_loading(valid_nwb_recording_filepath)