Intracellular electrophysiology#
Base Interface#
- class BaseIcephysInterface(file_paths: list)[source]#
Bases:
BaseExtractorInterface
Primary class for all intracellular NeoInterfaces.
- classmethod get_source_schema() dict [source]#
Infer the JSON schema for the source_data from the method signature (annotation typing).
- get_metadata() dict [source]#
Child DataInterface classes should override this to match their metadata.
- get_original_timestamps() ndarray [source]#
Retrieve the original unaltered timestamps for the data in this interface.
This function should retrieve the data on-demand by re-initializing the IO.
- Returns
timestamps – The timestamps for the data stream.
- Return type
numpy.ndarray
- get_timestamps() ndarray [source]#
Retrieve the timestamps for the data in this interface.
- Returns
timestamps – The timestamps for the data stream.
- Return type
numpy.ndarray
- set_aligned_timestamps(aligned_timestamps: ndarray)[source]#
Replace all timestamps for this interface with those aligned to the common session start time.
Must be in units seconds relative to the common ‘session_start_time’.
- Parameters
aligned_timestamps (numpy.ndarray) – The synchronized timestamps for data in this interface.
- set_aligned_starting_time(aligned_starting_time: float)[source]#
Align the starting time for this interface relative to the common session start time.
Must be in units seconds relative to the common ‘session_start_time’.
- Parameters
aligned_starting_time (float) – The starting time for all temporal data in this interface.
- align_by_interpolation(unaligned_timestamps: ndarray, aligned_timestamps: ndarray)[source]#
Interpolate the timestamps of this interface using a mapping from some unaligned time basis to its aligned one.
Use this method if the unaligned timestamps of the data in this interface are not directly tracked by a primary system, but are known to occur between timestamps that are tracked, then align the timestamps of this interface by interpolating between the two.
An example could be a metronomic TTL pulse (e.g., every second) from a secondary data stream to the primary timing system; if the time references of this interface are recorded within the relative time of the secondary data stream, then their exact time in the primary system is inferred given the pulse times.
Must be in units seconds relative to the common ‘session_start_time’.
- Parameters
unaligned_timestamps (numpy.ndarray) – The timestamps of the unaligned secondary time basis.
aligned_timestamps (numpy.ndarray) – The timestamps aligned to the primary time basis.
- add_to_nwbfile(nwbfile: NWBFile, metadata: Optional[dict] = None, icephys_experiment_type: str = 'voltage_clamp', skip_electrodes: Tuple[int] = ())[source]#
Primary function for converting raw (unprocessed) intracellular data to the NWB standard.
- Parameters
nwbfile (NWBFile) – nwb file to which the recording information is to be added
metadata (dict, optional) – metadata info for constructing the nwb file (optional).
icephys_experiment_type ({‘voltage_clamp’, ‘current_clamp’, ‘izero’}) – Type of icephys recording.
skip_electrodes (tuple, optional) – Electrode IDs to skip. Defaults to ().
Abf Interface#
- class AbfInterface(file_paths: list, icephys_metadata: dict = None, icephys_metadata_file_path: str = None)[source]#
Bases:
BaseIcephysInterface
Interface for ABF intracellular electrophysiology data.
ABF IcephysInterface based on Neo AxonIO.
- Parameters
file_paths (list) – List of files to be converted to the same NWB file.
icephys_metadata (dict, optional) – Dictionary containing the Icephys-specific metadata.
icephys_metadata_file_path (str, optional) – JSON file containing the Icephys-specific metadata.
- classmethod get_source_schema() dict [source]#
Infer the JSON schema for the source_data from the method signature (annotation typing).
- get_metadata() dict [source]#
Child DataInterface classes should override this to match their metadata.
- set_aligned_starting_time(aligned_starting_time: float)[source]#
Align the starting time for this interface relative to the common session start time.
Must be in units seconds relative to the common ‘session_start_time’.
- Parameters
aligned_starting_time (float) – The starting time for all temporal data in this interface.
- set_aligned_segment_starting_times(aligned_segment_starting_times: List[List[float]], stub_test: bool = False)[source]#
Align the individual starting time for each video in this interface relative to the common session start time.
Must be in units seconds relative to the common ‘session_start_time’.
- Parameters
aligned_segment_starting_times (list of list of floats) – The relative starting times of each video. Outer list is over file paths (readers). Inner list is over segments of each recording.