postgkyl.map_to_rz

postgkyl.map_to_rz(data, *, projection=None, mapc2p=None, nodes_file=None, z_axis=0.0, phi_tor=0.0, nz_interp=8, comp=0, inplace=False, tag=None, label=None)

Map a modal field component onto a physical R-Z slice.

Two-dimensional input deforms the interpolated grid. Three-dimensional reconstruction requires periodic field-aligned coordinates with twist-and-shift boundaries. Geometry is shared by all equation systems.

Parameters:
  • data – Un-interpolated 2-D or 3-D modal DG field.

  • projection – Reusable Python projection built with resolve_rz_projection; its computational grid must match data. Omit to load geometry.

  • mapc2p – Explicit modal geometry path, or ‘’ for the inferred modal file.

  • nodes_file – Explicit interior-node geometry path; excludes mapc2p. When both paths are omitted, infer geometry from data.file_name, preferring geo_int_nodes over geo_int_mapc2p. ‘*’ selects the block.

  • z_axis – Vertical offset in meters, added to geometry Z.

  • phi_tor – Toroidal angle in radians for a 3-D reconstruction.

  • nz_interp – Positive parallel-direction up-sampling factor for 3-D input.

  • comp – Zero-based physical field component to map.

  • inplace – Mutate and return data instead of creating a dataset.

  • tag – Optional result tag.

  • label – Optional result label.

Returns:

The caller’s concrete data class with NumPy point values and a 2-D grid. Projection geometry and sampling options cannot accompany a reusable projection; set them when building that projection instead.

CLI: map_to_rz