SPIShardPositions

The SPIShardPositions class encapsulates the output of the SPI shard positions \(\boldsymbol(x)_\mathrm{p}\) obtained from DREAM, and is derived from the ScalarQuantity class. It provides functionality to calculate the radial coordinates from the cartesian coordinates used for the SPI shard positions in DREAM.

Note

This class does currently not have access to the geometry used in the simulation, and hence the calculations made in this class all assume cylindrical geometry.

Class documentation

class DREAM.Output.SPIShardPositions.SPIShardPositions(name, data, grid, output, attr=[])

Bases: DREAM.Output.ScalarQuantity.ScalarQuantity

__init__(name, data, grid, output, attr=[])

Constructor.

calcRadialCoordinate(shards=None, t=None)

Calculates the radial coordinates of the shards (instead of the cartesian coordinates)

Parameters
  • shards (slice) – Shards wose radial coordinates should be calculated

  • t (slice) – time steps at which the radial coordinates should be calculated

Returns

radial coordinate rhop and poloidal angle thetap.

getMultiples()

Get the number of “multiples” (e.g. number of shards) covered by this quantity. The total number of elements in ‘self.data’ is the size of the grid on which this quantity lives (i.e. 1, since the shards are defined on a scalar grid) times this number.

plotRadialCoordinate(shards=None, **kwargs)

Wrapper for ScalarQuantity.plot(), calculating the radial coordinate of the shards instead of the cartesian coordinates. Also allows the user to choose which shards whose radial coordinates should be plotted. NOTE: Currently only valid for cylindrical geometry!

Parameters

shards (slice) – Shards wose radii should be plotted

Returns

Axis object containing the plot