postgkyl.magsq

postgkyl.magsq(data, *, coords='0:3', inplace=False, tag=None, label=None)

Magnitude squared of a vector field.

Sums the squares of the selected components (numerics.mag_sq), returning a single-component field.

Parameters:
  • data – the dataset holding the vector field; must contain point values.

  • coords – "start:end" slice of the component axis to sum the squares of. Defaults to the first three components.

  • 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 single-component dataset of the magnitude squared.

Raises:

ValueError – if data is unevaluated modal coefficients.

CLI: magsq