2.6.1.5. pycsamt.emtf.validation#

Validation helpers for the format-neutral EMTF scientific model.

Functions

normalize_channels(channels)

Normalize channel names while preserving order.

normalize_periods(periods, *[, n_periods])

Return a validated positive 1-D period vector.

normalize_tf_data(data, *, n_output, n_input)

Normalize a TF payload to (n_period, n_output, n_input).

pycsamt.emtf.validation.normalize_channels(channels)[source]

Normalize channel names while preserving order.

Parameters:

channels (Iterable[str] | None)

Return type:

tuple[str, …]

pycsamt.emtf.validation.normalize_periods(periods, *, n_periods=None)[source]

Return a validated positive 1-D period vector.

Parameters:

n_periods (int | None)

Return type:

ndarray | None

pycsamt.emtf.validation.normalize_tf_data(data, *, n_output, n_input)[source]

Normalize a TF payload to (n_period, n_output, n_input).

Empty channel lists represent scalar 1x1 products. A 1-D array is therefore accepted only for a scalar response and is promoted to (n_period, 1, 1). A 2-D array matching one output/input matrix is interpreted as a single period and promoted to 3-D.

Parameters:
  • n_output (int)

  • n_input (int)

Return type:

ndarray