ctf4science.data_module.get_validation_training_timesteps#

ctf4science.data_module.get_validation_training_timesteps(dataset_name, pair_id, train_split=0.8)#

Return training timesteps used for the validation split.

Returns physical time values (same units and formula as get_training_timesteps()) after applying the validation split logic. The split behaviour depends on pair_id:

  • pair_ids 2, 4 (reconstruction): no split; training timesteps are returned unchanged.

  • pair_id 8: the second training matrix is held out for validation; its timesteps are removed from the returned list.

  • pair_id 9: the third training matrix is held out; its timesteps are removed.

  • pair_ids 1, 3, 5, 6, 7: the single training matrix is split at floor(train_split * N) rows; only the first portion’s timesteps are returned.

Parameters:
dataset_namestr

Name of the dataset to load.

pair_idint

Data pair (1–9; special handling for 2, 4, 8, 9).

train_splitfloat, optional

Fraction of data for training in (0, 1). Default is 0.8. Ignored for pair_ids 2, 4, 8, 9.

Returns:
list of ndarray

Training timesteps for the validation setup (one array per training matrix after applying the split logic). Each array contains absolute physical times computed as (start_index + i) * delta_t.

Raises:
ValueError

If train_split is not in (0, 1) or pair_id is not in 1–9.