Skip to contents

Internal guard for spherical checks

Usage

ensure_is_spherical(data)

Arguments

data

An aniframe.

Examples

af <- example_aniframe(n_obs = 3, n_individuals = 1, n_keypoints = 1)
# Passes silently when the coordinate system matches
try(ensure_is_spherical(af))
#> Error in ensure_coordinate_system(data, "spherical", "spherical") : 
#>   This aniframe is not in a spherical coordinate system.
#>  coordinate_system is "cartesian_2d".
#>  Convert the coordinates first; anispace has the transformations.