View source: R/whdFromPositrack.R
The tracking system called Positrack creates files with the extension .positrack in which the x, y position of the animal is recorded. The head direction of the animal is also in the .positrack. file. This function create files with .whd extension with x, y, hd is given at fixed time intervals relative to the electrophysiological recording. During recording, positrack sends ttl pulses to the recording system and the ttl pulses are used to synchronize the position and electrophysiological data. By default, the ttl pulses are on the last channel in the .dat files. This function runs on a single recording session
1 2 | whdFromPositrack(rs, resSamplesPerWhdSample = 400, ttlChannel = NA,
maxUpDiffRes = 4000, overwrite = FALSE)
|
rs |
RecSession object |
resSamplesPerWhdSample |
Number of samples in the electrophysiological recording for each whd sample. |
ttlChannel |
Channel with the ttl signal in the .dat files. By default it is the last channel. Channel numbers start at 0. If you want a different channel for each trial, give a numeric vector with the list of channel. |
maxUpDiffRes |
Maximum difference between successive up for which position will be interpolated |
overwrite |
Logical indicating whether to recreate a whd file if one already exists |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.