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

Description Usage Arguments Details

View source: R/whdFromPositrack.R

Description

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.

Usage

1
whdAlignedTtlPositrack(up, posi, ccLength = 20)

Arguments

up

Time of up phase of ttl pulses

posi

Data from the positrack file

ccLength

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

Details

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 May 20, 2019, 9:06 a.m.