2.6.2 findCorrespondingTime() - shunnnli/NeuroDAP GitHub Wiki

Overview

Find sample index of the target system corresponding to reference system. Used extensively in plotTraces()

Inputs and options

Required inputs

  • eventIdx: sample index of the event in the reference system
  • timeRef: common timestamp for each sample in the reference system, stored in params.sync
  • timeTarget: common timestamp for each sample in the target system, stored in params.sync

Outputs

  • targetIdx: sample index of the event in the target system

Examples

timeInNI = 342324;
findCorrespondingTime(timeInNI, params.sync.timeNI, params.sync.timePhotometry)

image