postgkyl.relchange

postgkyl.relchange(data0, data, *, comp=None, inplace=False, tag=None, label=None)

Relative change of data with respect to the baseline data0.

Computes (data - data0) / data0 component-wise (numerics.rel_change). Both datasets are assumed to share the same grid and component layout.

Parameters:
  • data0 – the baseline (“before”) dataset – the denominator.

  • data – the dataset whose relative change is computed; the returned dataset is built from this one (its grid/ctx are the base of the result).

  • comp – when given, every numerator component is divided by this single baseline component instead of its own (e.g. normalize every energy component by the total energy component). None divides component-wise.

  • inplace – mutate and return data instead of a new dataset.

  • tag – optional tag for the returned dataset.

  • label – optional label for the returned dataset.

Returns:

A dataset of the relative change, built from data.

Raises:

ValueError – if either operand is unevaluated modal coefficients.

CLI: relchange