Positrack-class: An S4 class representing the path of an animal during a...

Description Details Slots

Description

This class is used to manipulate and represent the position data of the animal. The first data point is at time resSamplesPerWhlSample and not 0. The data are usually loaded from .whd, .res_samples_per_whl_sample, .sampling_rate_dat and .px_per_cm

Details

The position data likely come from a tracking system (e.g. positrack) in which the y-axis has its origin at the top-left of the screen. In contrast, most plotting functions in R have the y-axis origin at the bottom-left of the screen. This is important to know if you want to find out where landmarks relative to the animal.

Slots

session

A character vector containing the names of the recording session.

path

The directory in which the files of the session are located.

pxPerCm

Pixels per centimeter in the x and y position data.

samplingRateDat

Sampling rate of the .dat files in this recording session

resSamplesPerWhlSample

Number of samples in the .dat files between each position values.

xWhl

A numeric vector containing x data loaded from the .whl file.

yWhl

A numeric vector containing y data loaded from the .whl file.

hdWhd

A numeric vector containing the head direction of the animal, loaded from .whd file.

x

x position of the animal in cm

y

y position of the animal in cm

hd

Head direction of the animal

lin

Linearized position of the animal. Used for linear track data.

dir

Direction in the linearized position data (0 or 1)

speed

Linear speed in cm per sec

angularSpeed

Angular speed in degrees per sec

res

Sample number associated with each position value

defaultXYSmoothing

Default smoothing apply to the x and y position.

minShiftMs

Minimum shift of the position vector during a shuffling procedure

percentInvalidPosition

Percentage of data points with invalid position


kevin-allen/relectro documentation built on May 20, 2019, 9:06 a.m.