ExtrapolatorBase#
- class greensfield.models.ExtrapolatorBase(magnetogram, tangent_coord, corners, resample_factor=1, scale_z=None, extent_z=None)[source]#
Bases:
objectExtrapolate 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 bycornersso 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 frommagnetogram.resample_factor (
float, optional) – Factor by which to reduce the resolution of themagnetogram. 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
List of arrays representing the physical coordinates along each axis.
Heliocentric cartesian (HCC) coordinate frame
Coordinate of of the lower left corner of the boundary magnetogram
Methods Summary
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
- 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 fieldseeds (
SkyCoord, optional) – Coordinates of seed points. By default, these will be computed by thresholding the boundary magnetogramseed_threshold (
float, optional) – Fraction of maximum value of boundary magnetogram below which seed points will be placed. Ifseed_pointsare specified explicitly, this will be ignored.step_size (
float, optional) – Step size as a fraction of cell size. For more information, seeStreamTracer.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\) isstep_size.filter_near_boundaries (
bool, optional) – If True, exclude field lines which come near the boundaries of the extrapolated volume.
- Returns:
fieldlines – List of
SkyCoordobjects describing the traced fieldlines.- Return type: