input

Defines the import for different source filetypes.

source

FocusAreaPathRestrictions


def FocusAreaPathRestrictions(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

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

Source Data Handler:


source

Data


def Data(
    filepath:Path, loaded_data:Any
)->None:

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


source

Recording


def Recording(
    filepath:Path, loaded_data:Any
)->None:

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


source

ROI


def ROI(
    filepath:Path, loaded_data:Any
)->None:

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

Source Data Loader:


source

DataLoader


def DataLoader(
    filepath:Path
)->None:

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


source

GridWrapperROILoader


def GridWrapperROILoader(
    filepath:Path
)->None:

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


source

RecordingLoader


def RecordingLoader(
    filepath:Path
)->None:

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


source

AVILoader


def AVILoader(
    filepath:Path
)->None:

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


source

TIFFLoader


def TIFFLoader(
    filepath:Path
)->None:

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


source

NWBRecordingLoader


def NWBRecordingLoader(
    filepath:Path
)->None:

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


source

ROILoader


def ROILoader(
    filepath:Path
)->None:

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


source

ImageJROILoader


def ImageJROILoader(
    filepath:Path
)->None:

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


source

NWBROILoader


def NWBROILoader(
    filepath:Path
)->None:

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

Loader Factories


source

DataLoaderFactory


def DataLoaderFactory(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

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


source

RecordingLoaderFactory


def RecordingLoaderFactory(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

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


source

ROILoaderFactory


def ROILoaderFactory(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

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


source

get_filepaths_with_supported_extension_in_dirpath


def get_filepaths_with_supported_extension_in_dirpath(
    dirpath:Path, all_supported_extensions:List, max_results:Optional=None
)->List:

source

RecLoaderROILoaderCombinator


def RecLoaderROILoaderCombinator(
    dir_path:Path
)->None:

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)