whdAlignedTtlPositrack: Try to realign the up part of ttl pulses from .dat file and...

Description Usage Arguments Details

View source: R/whdFromPositrack.R


One assumption that is made is that there is variability in the intervals between frames in the positrack software These time intervals can be measured from the positrack file (startProcTime) and the ttl pulses. When there is no problem of alignment, the correlation between intervals of ttl and positrack is above .97 If there is an additional ttl detected, then the correlation goes down.


whdAlignedTtlPositrack(up, posi, ccLength = 20)



Time of up phase of ttl pulses


Data from the positrack file


Lenght of the segment of data to use for crosscorrelation when a delay mismach is found


The intervals between ups is calculated (dup) The intervals between the posi$startProcTime is calculated (dposi) We search for points where there is a large difference between dup and dposi. The crosscorrelation function for the data points just after the large difference is calculated. If the peak is before or after 0, then an up or a posi is removed.

kevin-allen/relectro documentation built on Sept. 4, 2018, 4:32 a.m.