simuran.loaders.base_loader module¶
The base loading class in SIMURAN.
-
class
simuran.loaders.base_loader.BaseLoader¶ Bases:
abc.ABCThis abstract class defines the layout of a SIMURAN loader.
A superclass may also define methods for loading individual records, as well as a full recording - such as load_spikes or load_signal, or load_stimulation.
-
load_recording(recording: simuran.recording.Recording) → None¶ Load the information into the recording object.
It has metadata or source files to help loading
Parameters: recording (simuran.recording.Recording) – The recording to load. Returns: Return type: None
-
parse_metadata(recording: simuran.recording.Recording) → None¶ Parse the information into the recording object.
Parses recording.attrs, for example: To set recording.source_file = (
Parameters: recording (simuran.Recording) – The recording object to parse into. Returns: Return type: None
-
parse_table_row(table: DataFrame, index: int, recording: Recording) → None¶ Extract a recording from a table which describes all data.
Each row is assumed to describe a recording.
Parameters: - table (pandas.DataFrame) – The table to parse from.
- index (pandas.DataFrame) – The index to grab from the table.
- recording (simuran.Recording) – The recording object to parse into.
Returns: Return type: None
-
-
class
simuran.loaders.base_loader.MetadataLoader¶ Bases:
simuran.loaders.base_loader.BaseLoaderOnly load parameters
-
load_recording(recording: simuran.recording.Recording) → None¶ Load the information into the recording object.
It has metadata or source files to help loading
Parameters: recording (simuran.recording.Recording) – The recording to load. Returns: Return type: None
-
parse_metadata(recording: simuran.recording.Recording) → None¶ Parse the information into the recording object.
Parses recording.attrs, for example: To set recording.source_file = (
Parameters: recording (simuran.Recording) – The recording object to parse into. Returns: Return type: None
-
parse_table_row(table: DataFrame, index: int, recording: Optional[Recording] = None) → Recording¶ Extract a recording from a table which describes all data.
Each row is assumed to describe a recording.
Parameters: - table (pandas.DataFrame) – The table to parse from.
- index (pandas.DataFrame) – The index to grab from the table.
- recording (simuran.Recording) – The recording object to parse into, default None None creates a new recording object.
Returns: Return type:
-