FortranTracer

class psipy.tracing.FortranTracer(max_steps='auto', step_size=1)

Bases: object

Tracer using Fortran code.

Parameters
max_steps: ‘auto’, int

Maximum number of steps each streamline can take before stopping. This directly sets the memory allocated to the traced streamlines, so do not set it too large. If set to 'auto' (the default),

step_sizefloat

Step size as a fraction of the smallest radial grid spacing.

Notes

Because the stream tracing is done in spherical coordinates, there is a singularity at the poles, which means seeds placed directly on the poles will not go anywhere.

Methods Summary

trace(mas_output, *, r, lat, lon[, t_idx])

Trace field lines.

Methods Documentation

trace(mas_output, *, r, lat: Unit('rad'), lon: Unit('rad'), t_idx=None)

Trace field lines.

Parameters
mas_outputpsipy.model.MASOutput

MAS model output. Must have all three magnetic field components available.

rnumpy.ndarray

Radial seed coordinates. These are interpreted in units equivalent to the mas_output radial units.

latastropy.units.Quantity

Latitude seed points. Must be same shape as r.

lonastropy.units.Quantity

Longitude seed points. Must be same shape as r.

t_idxint, optional

Time slice of the mas_output to trace through. Doesn’t need to be specified if only one time step is present.