pedpy.io.trajectory_loader module#

Load trajectories to the internal trajectory data format.

pedpy.io.trajectory_loader.load_trajectory(*, trajectory_file: Path, default_frame_rate: Optional[float] = None, default_unit: Optional[TrajectoryUnit] = None) TrajectoryData[source]#

Loads the trajectory file in the internal trajectory data 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

Tuple containing – trajectory data, frame rate, and type of trajectory.

Return type

TrajectoryData