ExtrapolatorBase#

class greensfield.models.ExtrapolatorBase(magnetogram, tangent_coord, corners, resample_factor=1, scale_z=None, extent_z=None)[source]#

Bases: object

Extrapolate 3D magnetic field in a Cartesian box.

Parameters:
  • magnetogram (GenericMap) – Map of photospheric magnetogram. This will be used to calculate the lower boundary condition. In general, it is a good idea to make this a bit larger than the field of view specified by corners so as to avoid missing pixels when reprojecting.

  • tangent_coord (SkyCoord) – Coordinate at which the lower boundary is tangent to the spherical surface of the Sun. For AR-level extrapolations, this is typically the center of the AR.

  • corners (SkyCoord) – Corners defining the field of view of the lower boundary. These are used to extract the lower boundary from magnetogram.

  • resample_factor (float, optional) – Factor by which to reduce the resolution of the magnetogram. This is often needed in practice in order to make the field extrapolation calculation tractable. Should be between 0 and 1.

  • scale_z (Quantity, optional) – Resolution in the vertical (perpendicular to the bottom boundary) direction. If not specified, this is calculated from the minimum resolution of the lower boundary. Note that this is the (Cartesian) width of a grid cell rather than an angular resolution.

  • extent_z (Quantity, optional) – The vertical extent of the volume in which the extrapolated field is calculated. If not specified, this defaults to the maximum extent of the lower boundary.

Attributes Summary

grid

List of arrays representing the physical coordinates along each axis.

hcc_frame

Heliocentric cartesian (HCC) coordinate frame

lower_left_corner

Coordinate of of the lower left corner of the boundary magnetogram

tangent_coord

Methods Summary

extrapolate()

trace(ds[, seeds, seed_threshold, ...])

Trace fieldlines through extrapolated volume.

Attributes Documentation

grid#

List of arrays representing the physical coordinates along each axis.

hcc_frame#

Heliocentric cartesian (HCC) coordinate frame

lower_left_corner#

Coordinate of of the lower left corner of the boundary magnetogram

tangent_coord#

Methods Documentation

extrapolate()[source]#
trace(ds, seeds=None, seed_threshold=-0.001, step_size=0.1, max_steps=None, filter_near_boundaries=True)[source]#

Trace fieldlines through extrapolated volume.

Parameters:
  • ds (xarray.Dataset) – Dataset containing extrapolated magnetic field

  • seeds (SkyCoord, optional) – Coordinates of seed points. By default, these will be computed by thresholding the boundary magnetogram

  • seed_threshold (float, optional) – Fraction of maximum value of boundary magnetogram below which seed points will be placed. If seed_points are specified explicitly, this will be ignored.

  • step_size (float, optional) – Step size as a fraction of cell size. For more information, see StreamTracer.

  • max_steps (int, optional) – Maximum number of steps allowed per fieldline. If not specified, maximum number of steps of \(4\max{(n_x,n_y,n_z)}/ds\) is used, where \(ds\) is step_size.

  • filter_near_boundaries (bool, optional) – If True, exclude field lines which come near the boundaries of the extrapolated volume.

Returns:

fieldlines – List of SkyCoord objects describing the traced fieldlines.

Return type:

list