postgkyl.diagnostics.vm.kinetic.transform_frame

postgkyl.diagnostics.vm.kinetic.transform_frame(distribution, bulk, *, cdim, inplace=False, tag=None, label=None)

Shift a distribution function to a moving frame of reference.

Shifts the velocity-space grid of distribution by the local bulk velocity so the distribution is expressed in the frame co-moving with the bulk flow. The values are unchanged; only the velocity coordinates are offset. Supports 1, 2, or 3 configuration-space dimensions.

Parameters:
  • distribution – The particle distribution function to shift; must be NumPy-backed.

  • bulk – The bulk (drift) velocity field; one component per velocity dimension. Must contain point values.

  • cdim – Number of configuration-space dimensions. The remaining grid axes are treated as velocity-space dimensions.

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

  • tag – optional tag for the returned dataset.

  • label – optional label for the returned dataset.

Returns:

A dataset with the same values on a velocity-shifted grid.

Raises:

ValueError – if either input is modal DG coefficients.

CLI: vm_kinetic_transform_frame