ctf4science.data_module.get_training_timesteps#
- ctf4science.data_module.get_training_timesteps(dataset_name: str, pair_id: int) list[ndarray]#
Return physical time values for each training matrix of the given pair.
For each training matrix, computes absolute physical times using:
timesteps[i] = (start_index + i) * delta_t, i = 0, ..., N-1
where
start_index = metadata['matrix_start_index'][matrix_name],N = metadata['matrix_shapes'][matrix_name][0](number of rows), anddelta_t = metadata['delta_t']. Values are absolute physical times along the underlying trajectory; the first value isstart_index * delta_tand the last is(start_index + N - 1) * delta_t.- Parameters:
- dataset_namestr
Name of the dataset (e.g.
'ODE_Lorenz','PDE_KS').- pair_idint
ID of the train-test pair.
- Returns:
- list of ndarray
One 1D array per training matrix. Each array has
Nelements spanning[start_index * delta_t, (start_index + N - 1) * delta_t].
- Raises:
- ValueError
If pair_id is missing, train matrices or metadata are missing.
Notes
Example — ODE_Lorenz, pair 1:
X1train.mathas shape[10000, 3],start_index=0,delta_t=0.05. Returns a list with one array of 10000 values in[0.0, 499.95].Example — ODE_Lorenz, pair 8: Three training matrices
X6train/X7train/X8train, each with shape[10000, 3],start_index=0,delta_t=0.05. Returns a list of three arrays, each spanning[0.0, 499.95].See the dataset YAML configs under
data/<dataset_name>/for thematrix_shapes,matrix_start_index, anddelta_tvalues for every matrix.