2.7.1 assignTimeStamp() - shunnnli/NeuroDAP GitHub Wiki

Overview

Assign common timestamp for a target acquisition system given the timestamp of another reference acquisition system (which should have higher sampling frequency). For example, if the session is recorded using both NIDAQ (sampling at 10kHz) and Labjack (sampling at 2kHz). Then the reference acquisition system is NIDAQ. See loadSessions() for more information.

Inputs and options

Required inputs

  • timeLow: double, initialized vector ready for storing the timestamp for the target acquisition system
  • timeHigh: double, filled in timestamp for the reference acquisition system
  • idx_low: double, sync pulses of the target acquisition system
  • idx_high: double, sync pulses of the reference acquisition system
  • lowFs: double, sampling frequency of the target acquisition system

Outputs

  • timeLow: double, timestamp of the acquisition system for each data sample.
  • l: double, the common last sync pulse of the two acquisition system.

Examples

[timePhotometry,l_LJNI] = assignTimeStamp(timePhotometry,timeNI,idx_LJ,idx_NI,params.sync.labjackFs);