Load Trajectories#

Load trajectories to the internal trajectory data format.

class TrajectoryUnit#

Identifier of the unit of the trajectory coordinates.

CENTIMETER = (100, 'centimeter (cm)')#
METER = (1, 'meter (m)')#
load_trajectory(*, trajectory_file, default_frame_rate=None, default_unit=None)#

Loads the trajectory file in the internal TrajectoryData format.

Loads the relevant data: trajectory data, frame rate, and type of trajectory from the given trajectory file. If the file does not contain some data, defaults can be submitted.

Parameters:
  • trajectory_file (pathlib.Path) – file containing the trajectory

  • default_frame_rate (float) – frame rate of the file, None if frame rate from file is used

  • default_unit (TrajectoryUnit) – unit in which the coordinates are stored in the file, None if unit should be parsed from the file

Returns:

TrajectoryData representation of the file data

Return type:

pedpy.data.trajectory_data.TrajectoryData