postgkyl.val2coord

postgkyl.val2coord(data, *, x, y, periodic=False, tag=None, label=None)

Build new (x, y) datasets from columns of a DynVector.

Reinterprets columns of data (typically a DynVector / diagnostic table) as plot-ready datasets: the x column(s) become the grid and the y column(s) become the values. One output dataset is produced per selected y-component. When more than one x-component is selected, their count must match the number of y-components (paired one-to-one); a single x-component is shared across all y-components.

Parameters:
  • data – the source dataset whose last-axis columns are selected; must be NumPy-backed.

  • x – component selector for the independent variable: an integer index, a comma-separated list (e.g. '0,2'), or a 'lo:hi[:step]' slice.

  • y – component selector for the dependent variable(s); same forms as x. One output dataset is produced per selected y-component.

  • periodic – when True, append the first sample to the end of each output (wrapping) so periodic data closes on itself.

  • tag – optional tag for the returned datasets.

  • label – optional label for the returned datasets.

Returns:

A GDataStateGroup containing one dataset per selected y-component.

Raises:

ValueError – if data is unevaluated modal coefficients, or if more than one x-component is selected and their number does not equal the number of y-components.

CLI: val2coord