allensdk.brain_observatory.sync_utilities package

Module contents

allensdk.brain_observatory.sync_utilities.get_synchronized_frame_times(session_sync_file: pathlib.Path, sync_line_label_keys: Tuple[str, ...], trim_after_spike: bool = True) → pandas.core.series.Series[source]

Get experimental frame times from an experiment session sync file.

Parameters:
session_sync_file : Path

Path to an ephys session sync file. The sync file contains rising/falling edges from a daq system which indicates when certain events occur (so they can be related to each other).

sync_line_label_keys : Tuple[str, …]

Line label keys to get times for. See class attributes of allensdk.brain_observatory.sync_dataset.Dataset for a listing of possible keys.

trim_after_spike : bool = True

If True, will call trim_discontiguous_times on the frame times before returning them, which will detect any spikes in the data and remove all elements for the list which come after the spike.

Returns:
pd.Series

An array of times when frames for the eye tracking camera were acquired.

allensdk.brain_observatory.sync_utilities.trim_discontiguous_times(times, threshold=100)[source]