pyampp.gxbox.box

Attributes

SphericalScreen

Classes

BoxGeometryMixin

Shared geometric helpers for model and observer-aligned FOV boxes.

Box

Represents a 3D box in solar or observer coordinates defined by its origin, center, dimensions, and resolution.

Module Contents

pyampp.gxbox.box.SphericalScreen = None[source]
class pyampp.gxbox.box.BoxGeometryMixin[source]

Shared geometric helpers for model and observer-aligned FOV boxes.

grid_zbase_mm() float[source]
model_box_corners_local_mm() numpy.ndarray[source]
model_box_corners_world() astropy.coordinates.SkyCoord | None[source]
model_box_corners_projected(observer=None, obstime=None) astropy.coordinates.SkyCoord | None[source]

Project the physical red-box corners into a target observer’s sky plane.

Parameters:
  • observer (optional) – Observer accepted by SunPy’s Helioprojective frame, typically a SkyCoord in a solar frame. If omitted, the current box observer is used.

  • obstime (optional) – Observation time for the target frame. If omitted, the current box frame time is used.

Returns:

The 8 model-box corners transformed into the target Helioprojective frame.

Return type:

astropy.coordinates.SkyCoord or None

model_box_corners_observer_heliocentric(observer=None, obstime=None) astropy.coordinates.SkyCoord | None[source]

Transform the physical red-box corners into an observer-centric heliocentric frame where z is aligned with the line of sight.

model_box_inscribing_fov(observer=None, obstime=None, pad_arcsec: float = 0.0) dict | None[source]

Compute the inscribing sky-plane rectangle for the physical red box.

The returned rectangle is the smallest axis-aligned HPC rectangle that contains the projected 8 red-box corners for the given observer.

model_box_inscribing_fov_box(observer=None, obstime=None, pad_xy_arcsec: float = 0.0, pad_z_frac: float = 0.1) dict | None[source]

Compute the full observer-aligned 3D FOV box that inscribes the red box.

The x/y footprint is the smallest axis-aligned rectangle on the target observer’s sky plane that contains the projected red-box corners. The z extent is derived from the red-box corners in the observer-centric heliocentric frame, with an optional fractional padding.

fov_box_corners_world(fov_box_meta: dict | None = None) astropy.coordinates.SkyCoord | None[source]
fov_box_corners_local_mm(fov_box_meta: dict | None = None) numpy.ndarray | None[source]
class pyampp.gxbox.box.Box(frame_obs, box_origin, box_center, box_dims, box_res)[source]

Bases: BoxGeometryMixin

Represents a 3D box in solar or observer coordinates defined by its origin, center, dimensions, and resolution.

This class calculates and stores the coordinates of the box’s edges, differentiating between bottom edges and other edges. It is designed to integrate with solar physics data analysis frameworks such as SunPy and Astropy.

corners[source]
edges[source]
b3dtype = ['pot', 'nlfff'][source]
b3d[source]
corona_models[source]
corona_type = None[source]
property dims_pix[source]
property grid_coords[source]
bounds_coords_bl_tr(pad_frac=0.0)[source]
property bounds_coords[source]
property bottom_bounds_coords[source]
property bottom_cea_header[source]
bottom_top_header(dsun_obs=None)[source]
property bottom_edges[source]
property non_bottom_edges[source]
property all_edges[source]
property box_view_up[source]

Return two nearby points in the observer frame that define the local +Y (screen up) direction. The viewer converts these to Heliocentric and takes their vector difference.