API reference

pfsspy Package

Functions

pfss(input)

Compute PFSS model.

Classes

Input(br, nr, rss)

Input to PFSS modelling.

Output(alr, als, alp, grid[, input_map])

Output of PFSS modelling.

Class Inheritance Diagram

digraph inheritancea0bf945f39 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Input" [URL="api/pfsspy.Input.html#pfsspy.Input",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Input to PFSS modelling."]; "Output" [URL="api/pfsspy.Output.html#pfsspy.Output",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Output of PFSS modelling."]; }

pfsspy.grid Module

Classes

Grid(ns, nphi, nr, rss)

Grid on which the pfsspy solution is calculated.

Class Inheritance Diagram

digraph inheritance14472a5c62 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Grid" [URL="api/pfsspy.grid.Grid.html#pfsspy.grid.Grid",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Grid on which the pfsspy solution is calculated."]; }

pfsspy.fieldline Module

Classes

ClosedFieldLines(field_lines)

A set of closed field lines.

FieldLine(x, y, z, output)

A single magnetic field line.

FieldLines(field_lines)

A collection of FieldLine.

OpenFieldLines(field_lines)

A set of open field lines.

Class Inheritance Diagram

digraph inheritance0648993b59 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ClosedFieldLines" [URL="api/pfsspy.fieldline.ClosedFieldLines.html#pfsspy.fieldline.ClosedFieldLines",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A set of closed field lines."]; "FieldLines" -> "ClosedFieldLines" [arrowsize=0.5,style="setlinewidth(0.5)"]; "FieldLine" [URL="api/pfsspy.fieldline.FieldLine.html#pfsspy.fieldline.FieldLine",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A single magnetic field line."]; "FieldLines" [URL="api/pfsspy.fieldline.FieldLines.html#pfsspy.fieldline.FieldLines",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A collection of :class:`FieldLine`."]; "OpenFieldLines" [URL="api/pfsspy.fieldline.OpenFieldLines.html#pfsspy.fieldline.OpenFieldLines",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A set of open field lines."]; "FieldLines" -> "OpenFieldLines" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

pfsspy.tracing Module

Classes

FortranTracer([max_steps, step_size])

Tracer using Fortran code.

PythonTracer([atol, rtol])

Tracer using native python code.

Tracer()

Abstract base class for a streamline tracer.

Class Inheritance Diagram

digraph inheritance420ccb61ec { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "FortranTracer" [URL="api/pfsspy.tracing.FortranTracer.html#pfsspy.tracing.FortranTracer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Tracer using Fortran code."]; "Tracer" -> "FortranTracer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonTracer" [URL="api/pfsspy.tracing.PythonTracer.html#pfsspy.tracing.PythonTracer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Tracer using native python code."]; "Tracer" -> "PythonTracer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Tracer" [URL="api/pfsspy.tracing.Tracer.html#pfsspy.tracing.Tracer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for a streamline tracer."]; "ABC" -> "Tracer" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

pfsspy.utils Module

Functions

car_to_cea(m[, method])

Reproject a plate-carée map in to a cylindrical-equal-area map.

carr_cea_wcs_header(dtime, shape, *[, ...])

Create a Carrington WCS header for a Cylindrical Equal Area (CEA) projection.

fix_hmi_meta(hmi_map)

Fix non-compliant FITS metadata in HMI maps.

is_car_map(m[, error])

Returns True if m is in a plate carée projeciton.

is_cea_map(m[, error])

Returns True if m is in a cylindrical equal area projeciton.

is_full_sun_synoptic_map(m[, error])

Returns True if m is a synoptic map spanning the solar surface.

load_adapt(adapt_path)

Parse adapt .fts file as a sunpy.map.MapSequence

roll_map(m[, lh_edge_lon, method])

Roll an input synoptic map so that it's left edge corresponds to a specific Carrington longitude.

pfsspy.analytic Module

Analytic inputs and solutions to the PFSS equations.

This sub-module contains functions to generate solutions to the PFSS equations in the case where the input field is a single spherical harmonic, specified with the spherical harmonic numbers l, m.

All angular quantities must be passed as astropy quantities. All radial quantities are passed normalised to the source surface radius, and therefore can be passed as normal scalar values.

Angular definitions

  • theta is the polar angle, in the range \(0, \pi\) (ie. the co-latitude).

  • phi is the azimuthal angle, in the range \(0, 2\pi\).

Using this module requires sympy to be installed.

Functions

Bphi(l, m, zss)

Analytic phi component of magnetic field on the source surface.

Br(l, m, zss)

Analytic radial component of magnetic field on the source surface.

Btheta(l, m, zss)

Analytic theta component of magnetic field on the source surface.