circleCorrect: Shift localization responses so they are centred on the...

View source: R/localization.R

circleCorrectR Documentation

Shift localization responses so they are centred on the origin

Description

Shift localization responses so they are centred on the origin

Usage

circleCorrect(df, unit = "cm", vrbl = "tap", r = 1, fitr = FALSE)

Arguments

df

Data frame with localization coordinates (X,Y).

unit

Unit of the coordinates (default: 'cm')

vrbl

Variable of coordinates (default: 'tap')

r

Radius of the circle the coordinates should be on (default: 1).

fitr

(boolean) Should radius be fit? (default: FALSE)

Details

The parameters vrbl and unit are combined with a lower case x and y: tapx_cm and tapy_cm with default settings. These should be columns in the data frame (df).

Value

The data frame with corrected tapx_cm and tapy_cm columns. The corrected localization responses fall closest to a circle with radius r (in unit) and origin (0,0). Only response with df$selected == 1 are used for this correction.


thartbm/handlocs documentation built on June 1, 2025, 9:10 p.m.