allensdk.brain_observatory.ecephys.align_timestamps.probe_synchronizer module

class allensdk.brain_observatory.ecephys.align_timestamps.probe_synchronizer.ProbeSynchronizer(global_probe_sampling_rate, local_probe_sampling_rate, total_time_shift, min_time, max_time)[source]

Bases: object

classmethod compute(master_barcode_times, master_barcodes, probe_barcode_times, probe_barcodes, min_time, max_time, probe_start_index, local_probe_sampling_rate)[source]

Compute a transform from probe samples to master times by aligning barcodes.

master_barcode_times : np.ndarray

start times of barcodes (according to the master clock) on the master line. One per barcode.

master_barcodes : np.ndarray

barcode values on the master line. One per barcode

probe_barcode_times : np.ndarray

start times (according to the probe clock) of barcodes on the probe line. One per barcode

probe_barcodes : np.ndarray

barcode values on the probe_line. One per barcode

min_time : Float

time (in seconds) of first barcode to align

max_time : Float

time (in seconds) of last barcode to align

probe_start_index : int

sample index of probe acquisition start time

local_probe_sampling_rate : float

the probe’s apparent sampling rate

ProbeSynchronizer :

When called, applies the transform computed here to samples on the probe clock.


The ratio of the probe’s sampling rate assessed on the global clock to the probe’s locally assessed sampling rate.