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.ndarraycontaining the Bx, By, Bz vector components at each defined point in space.nodes – n x 3
numpy.ndarraycontaining the x, y and z coordinates of each defined point in space.F – n x 3
numpy.ndarraycontaining the plasma forcing vector Fx, Fy and Fz components at each defined point in space.header – a
dictcontaining 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.NearestNDInterpolatoris 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
Bgrid –
streamtracer.VectorGridobject 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]