class TrajectoryDataset

class deeptime.util.data.TrajectoryDataset(lagtime, trajectory)

Creates a trajectory dataset from a single trajectory by applying a lagtime.

Parameters:
  • lagtime (int) – Lagtime, must be positive. The effective size of the dataset reduces by the selected lagtime.

  • trajectory ((T, d) ndarray) – Trajectory with T frames in d dimensions.

Raises:

AssertionError – If lagtime is not positive or trajectory is too short for lagtime.

Attributes

data

Instantaneous data.

data_lagged

Time-lagged data.

lagtime

trajectory

Methods

astype(dtype)

Sets the datatype of contained arrays and returns a new instance of TimeLaggedDataset.

from_trajectories(lagtime, data)

Creates a time series dataset from multiples trajectories by applying a lagtime.

setflags([write])

Set writeable flags for contained arrays.

astype(dtype)

Sets the datatype of contained arrays and returns a new instance of TimeLaggedDataset.

Parameters:

dtype – The new dtype.

Returns:

converted_ds – The dataset with converted dtype.

Return type:

TimeLaggedDataset

static from_trajectories(lagtime, data: List[ndarray])

Creates a time series dataset from multiples trajectories by applying a lagtime.

Parameters:
  • lagtime (int) – Lagtime, must be positive. The effective size of the dataset reduces by the selected lagtime.

  • data (list of ndarray) – List of trajectories.

Returns:

dataset – Concatenation of timeseries datasets.

Return type:

TrajectoriesDataset

Raises:

AssertionError – If data is empty, lagtime is not positive, the shapes do not match, or lagtime is too long for all of the trajectories.

setflags(write=True)

Set writeable flags for contained arrays.

property data: ndarray

Instantaneous data.

property data_lagged: ndarray

Time-lagged data.