pyrokinetics.gk_code.gk_output.Coords#

class pyrokinetics.gk_code.gk_output.Coords(kx, ky, time, species, theta=None, mode=None, energy=None, pitch=None, field=None)[source]#

Bases: GKOutputArgs

Utility dataclass type used to pass coordinates to GKOutput

Parameters:
  • kx (numpy.typing.ArrayLike)

  • ky (numpy.typing.ArrayLike)

  • time (numpy.typing.ArrayLike)

  • species (Iterable[str])

  • theta (numpy.typing.ArrayLike | None)

  • mode (numpy.typing.ArrayLike | None)

  • energy (numpy.typing.ArrayLike | None)

  • pitch (numpy.typing.ArrayLike | None)

  • field (Iterable[str] | None)

__init__(kx, ky, time, species, theta=None, mode=None, energy=None, pitch=None, field=None)#
Parameters:
  • kx (numpy.typing.ArrayLike)

  • ky (numpy.typing.ArrayLike)

  • time (numpy.typing.ArrayLike)

  • species (Iterable[str])

  • theta (numpy.typing.ArrayLike | None)

  • mode (numpy.typing.ArrayLike | None)

  • energy (numpy.typing.ArrayLike | None)

  • pitch (numpy.typing.ArrayLike | None)

  • field (Iterable[str] | None)

Return type:

None

Methods

__init__(kx, ky, time, species[, theta, ...])

items()

Dict-like items iteration

units(name, c)

Return the units for each quantity

values()

Dict-like values iteration

with_units(c)

Apply units to each quantity in turn and return a new Coords.

Attributes

coords

Tuple containing the names of each supplied field (those that aren't None).

energy

1D grid of the energy in the simulation Units of [dimensionless]

field

List of fields.

mode

TODO document

names

Names of all quantities held by this dataclass

pitch

1D grid of the pitch angle in the simulation Units of [dimensionless]

shape

Shape of quantities.

theta

1D grid of theta used in the simulation Units of [radians]

kx

1D grid of radial wave-numbers used in the simulation Units of [rhoref ** -1]

ky

1D grid of bi-normal wave-numbers used in the simulation Units of [rhoref ** -1]

time

1D grid of time of the simulation output Units of [lref / vref]

species

List of species names in the simulation

energy: Optional[ArrayLike] = None#

1D grid of the energy in the simulation Units of [dimensionless]

field: Optional[Iterable[str]] = None#

List of fields. Normally this information is obtained from the Fields class, but there are edge cases in which no Fields can be supplied but a fields coordinate must be defined.

kx: ArrayLike#

1D grid of radial wave-numbers used in the simulation Units of [rhoref ** -1]

ky: ArrayLike#

1D grid of bi-normal wave-numbers used in the simulation Units of [rhoref ** -1]

mode: Optional[ArrayLike] = None#

TODO document

pitch: Optional[ArrayLike] = None#

1D grid of the pitch angle in the simulation Units of [dimensionless]

property shape: NoReturn#

Shape of quantities. Raises error if all are None. Should be overridden in Coords, where this function makes no sense.

species: Iterable[str]#

List of species names in the simulation

theta: Optional[ArrayLike] = None#

1D grid of theta used in the simulation Units of [radians]

time: ArrayLike#

1D grid of time of the simulation output Units of [lref / vref]

units(name, c)[source]#

Return the units for each quantity

Return type:

Unit

Parameters: