# Specification of filepaths that can be used for testing:
### ImageJ ROI filepaths:
= Path('../test_data/00/RoiSet_spiking.zip')
valid_imagej_roi_filepath_1 = Path('../test_data/00/focus_area/focus_spiking.roi')
valid_imagej_roi_filepath_2 ### NWB ROI filepath:
= Path('../test_data/02/spiking_neuron.nwb')
valid_nwb_roi_filepath
### AVI Recording filepath:
= Path('../test_data/00/spiking_neuron.avi')
valid_avi_recording_filepath ### NWB Recording filepath:
= Path('../test_data/02/spiking_neuron.nwb')
valid_nwb_recording_filepath
### A filepath of an unsupported file type:
= Path('../test_data/00/example_test_results_for_spiking_neuron/activity_overview.png') unsupported_filepath
input
FocusAreaPathRestrictions
FocusAreaPathRestrictions ()
Initialize self. See help(type(self)) for accurate signature.
Source Data Handler:
Data
Data (filepath:pathlib.Path, loaded_data:Any)
Helper class that provides a standard way to create an ABC using inheritance.
Recording
Recording (filepath:pathlib.Path, loaded_data:Any)
Helper class that provides a standard way to create an ABC using inheritance.
ROI
ROI (filepath:pathlib.Path, loaded_data:Any)
Helper class that provides a standard way to create an ABC using inheritance.
Source Data Loader:
DataLoader
DataLoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
GridWrapperROILoader
GridWrapperROILoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
RecordingLoader
RecordingLoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
AVILoader
AVILoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
NWBRecordingLoader
NWBRecordingLoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
ROILoader
ROILoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
ImageJROILoader
ImageJROILoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
NWBROILoader
NWBROILoader (filepath:pathlib.Path)
Helper class that provides a standard way to create an ABC using inheritance.
Loader Factories
DataLoaderFactory
DataLoaderFactory ()
Helper class that provides a standard way to create an ABC using inheritance.
RecordingLoaderFactory
RecordingLoaderFactory ()
Helper class that provides a standard way to create an ABC using inheritance.
ROILoaderFactory
ROILoaderFactory ()
Helper class that provides a standard way to create an ABC using inheritance.
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 )
RecLoaderROILoaderCombinator
RecLoaderROILoaderCombinator (dir_path:pathlib.Path)
Initialize self. See help(type(self)) for accurate signature.
= ROILoaderFactory()
roi_loader_factory
# 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)
= RecordingLoaderFactory()
recording_loader_factory
# 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)