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.


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=[])


calcRadialCoordinate(shards=None, t=None)

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

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

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


radial coordinate data_rhop and poloidal angle data_thetap

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!


shards (slice) – Shards wose radii should be plotted


Axis object containing the plot