wormpose.pose.distance_metrics

Contains function to calculate distances between worm poses, either represented as angles or as skeletons

wormpose.pose.distance_metrics.angle_distance(theta_a: numpy.ndarray, theta_b: numpy.ndarray) float[source]

Angle distance that takes into account the periodicity of angles

wormpose.pose.distance_metrics.skeleton_distance(skel_a: numpy.ndarray, skel_b: numpy.ndarray) float[source]

Cosine similarity between the two head to tail vectors of the input skeletons