LegacyElementsReader¶
class LegacyElementsReader(settings: Optional[dict] = None)
Bases: TCossaLabABFReader
Subclass of MetaReader for reading ABF2 files
Public Methods¶
(none)
Private Methods¶
- LegacyElementsReader._get_configs(datafiles: List[str]) List[dict]¶
Load configuration files as dictionaries, corresponding to datamaps as needed. Default behavior assumes there are no config files needed.
- Parameters:
datafiles (List[str]) – List of data file paths.
- Returns:
List of configuration dictionaries.
- Return type:
List[dict]
- Raises:
NotImplementedError – If the file type is not ABF2 specifically
TypeError – If one of the channels does not have an “I” in its header label
ValueError – If any number of channels other than 2 is found in the data file
- LegacyElementsReader._get_file_channel_stamps(file_names: List[str], configs: List[dict]) List[int]¶
Get a list of serialization keys used to sort the list of files associated to the experiment.
- LegacyElementsReader._get_file_pattern(file_name: str) str¶
Get the base name for matching other files to the same dataset as the initial one provided to the constructor.
- Parameters:
file_name (str) – File path.
- Returns:
Base name for matching other files.
- Return type:
- Raises:
ValueError – If the base naming pattern cannot be ascertained.
- LegacyElementsReader._get_file_time_stamps(file_names: List[str], configs: List[dict]) List[int]¶
Get a list of serialization keys used to sort the list of files associated to the experiment.
- Parameters:
- Returns:
List of timestamps parsed from configuration.
- Return type:
List[int]
- Raises:
ValueError – If the filename does not match the expected pattern