ocetrac.measures.MotionMeasures

class ocetrac.measures.MotionMeasures(use_decorators: bool = True)

Calculates motion characteristics of labeled geospatial objects.

Provides methods for tracking object movement through centroid and center of mass calculations, displacement measures.

__init__(use_decorators: bool = True)

Initialize motion metrics calculator.

Parameters

use_decoratorsbool, optional

Enable/disable timing decorators (default: True)

Methods

__init__([use_decorators])

Initialize motion metrics calculator.

calculate_centroid_displacement(labels)

Calculate centroid displacements over time.

calculate_centroids(labels, timestep)

Calculate centroids for all regions at a specified timestep.

calculate_com_displacement(intensity)

Calculate center of mass displacements over time.

calculate_coms(labels, intensity, timestep)

Calculate centers of mass for intensity-weighted regions.

calculate_directionality(coords)

Calculate mean movement direction from coordinate sequence.