Count entries into a goal zone for circular arena trajectories
Source:R/circular_statistics.R
count_goal_entries.RdFor each trial, counts the number of times the trajectory enters a circular zone of radius `crossing_radius` centred on the goal location. Applicable to any circular arena experiment with a defined goal (hidden platform in a water maze, reward zone in an open-field, etc.).
Usage
count_goal_entries(
x,
target_angle,
target_radius = 1,
crossing_radius = 0.15,
coords = c("absolute", "relative")
)Arguments
- x
A [`TrajSet`] object with x/y (or rel_x/rel_y) columns registered.
- target_angle
Numeric. Radians. Direction of the goal from the arena centre.
- target_radius
Numeric. Distance of the goal from the arena centre. Default `1` (wall). Together with `target_angle` gives the goal position: `gx = target_radius * cos(target_angle)`, `gy = target_radius * sin(target_angle)`.
- crossing_radius
Numeric. Radius of the goal zone in unit-circle coordinates. Default `0.15` (15% of arena radius; roughly a 10 cm platform in a 60 cm pool).
- coords
Character. `"absolute"` (default) or `"relative"`. See [zone_dwell()].