tasi.TrajectoryDataset.trajectory#
- TrajectoryDataset.trajectory(index, inverse=False)[source]#
Select trajectory data for specific indices, or exclude them if inverse is set to True.
- Parameters:
index (Union[int, Iterable[int]], optional) – An integer or an iterable of integers representing the indices of the trajectories to select. If a single integer is provided, only the trajectory corresponding to that index is selected. If a list or other iterable of integers is provided, all trajectories corresponding to those indices are selected.
inverse (bool, optional) – If set to True, the selection is inverted, meaning the specified indices are excluded from the resulting dataset, and all other trajectories are included. Defaults to False.
- Returns:
A trajectory or multiple trajectories of the dataset.
- Return type:
tasi.Trajectory | TrajectoryDataset