Text#
Time Intervals#
- class TimeIntervalsInterface(file_path: FilePathType, read_kwargs: Optional[dict] = None, verbose: bool = True)[source]#
Bases:
BaseDataInterface
Abstract Interface for time intervals.
- Parameters
file_path (FilePath)
read_kwargs (dict, optional)
verbose (bool, default: True)
- get_metadata() dict [source]#
Child DataInterface classes should override this to match their metadata.
- add_to_nwbfile(nwbfile: NWBFile, metadata: Optional[dict] = None, tag: str = 'trials', column_name_mapping: Optional[Dict[str, str]] = None, column_descriptions: Optional[Dict[str, str]] = None) NWBFile [source]#
Run the NWB conversion for the instantiated data interface.
- Parameters
nwbfile (NWBFile, optional) – An in-memory NWBFile object to write to the location.
metadata (dict, optional) – Metadata dictionary with information used to create the NWBFile when one does not exist or overwrite=True.
tag (str, default: “trials”)
column_name_mapping (dict, optional) – If passed, rename subset of columns from key to value.
column_descriptions (dict, optional) – Keys are the names of the columns (after renaming) and values are the descriptions. If not passed, the names of the columns are used as descriptions.
CSV#
- class CsvTimeIntervalsInterface(file_path: FilePathType, read_kwargs: Optional[dict] = None, verbose: bool = True)[source]#
Bases:
TimeIntervalsInterface
Interface for adding data from a .csv file as a TimeIntervals object
- Parameters
file_path (FilePath)
read_kwargs (dict, optional)
verbose (bool, default: True)
Excel#
- class ExcelTimeIntervalsInterface(file_path: FilePathType, read_kwargs: Optional[dict] = None, verbose: bool = True)[source]#
Bases:
TimeIntervalsInterface
Interface for adding data from an Excel file to NWB as a TimeIntervals object
- Parameters
file_path (FilePath)
read_kwargs (dict, optional) – Passed to pandas.read_excel()
verbose (bool, default: True)