The PARSE class

class readparse.PARSE(hdul)

A class that holds and manages the scattered vector magnetic field data from a PARSE simulation.

Parameters

hdul (astropy.io.fits.HDUList) – An astropy-opened FITS header list from the current PARSE version.

Variables
  • B – n x 3 numpy.ndarray containing the Bx, By, Bz vector components at each defined point in space.

  • nodes – n x 3 numpy.ndarray containing the x, y and z coordinates of each defined point in space.

  • F – n x 3 numpy.ndarray containing the plasma forcing vector Fx, Fy and Fz components at each defined point in space.

  • header – a dict containing the metadata for the PARSE run, including its spatial size and coordinates at time of observation. For a full list of keys, see Mathews & Thompson 2023, Table 2.

PARSE.compile_grid(res=100)

Adds an instance variable which can be used to plot. scipy.interpolate.NearestNDInterpolator is used to perform the interpolation.

Parameters

res (int) – The minimum number of points in each dimension of the interpolated grid. Defaults to 100. In the event field lines are traced, res also determines the step size and step maximum for the streamline tracer.

Variables

Bgridstreamtracer.VectorGrid object defining the interpolated grid.

PARSE.fieldlines(seedpoints)

Wrapper for streamtracer.StreamTracer.trace(). Returns the fieldlines, and also stores them in _stracer.xs.

Parameters

seedpoints (numpy.ndarray) – m x 3 array containing the x,y,z coordinates for the starting point of the field lines

Returns

A list of coordinates for each field line.

Return type

list[numpy.ndarray]