pyampp.gxbox.box ================ .. py:module:: pyampp.gxbox.box Attributes ---------- .. autoapisummary:: pyampp.gxbox.box.SphericalScreen Classes ------- .. autoapisummary:: pyampp.gxbox.box.BoxGeometryMixin pyampp.gxbox.box.Box Module Contents --------------- .. py:data:: SphericalScreen :value: None .. py:class:: BoxGeometryMixin Shared geometric helpers for model and observer-aligned FOV boxes. .. py:method:: grid_zbase_mm() -> float .. py:method:: model_box_corners_local_mm() -> numpy.ndarray .. py:method:: model_box_corners_world() -> astropy.coordinates.SkyCoord | None .. py:method:: model_box_corners_projected(observer=None, obstime=None) -> astropy.coordinates.SkyCoord | None Project the physical red-box corners into a target observer's sky plane. :param observer: Observer accepted by SunPy's ``Helioprojective`` frame, typically a ``SkyCoord`` in a solar frame. If omitted, the current box observer is used. :type observer: optional :param obstime: Observation time for the target frame. If omitted, the current box frame time is used. :type obstime: optional :returns: The 8 model-box corners transformed into the target ``Helioprojective`` frame. :rtype: `astropy.coordinates.SkyCoord` or None .. py:method:: model_box_corners_observer_heliocentric(observer=None, obstime=None) -> astropy.coordinates.SkyCoord | None Transform the physical red-box corners into an observer-centric heliocentric frame where ``z`` is aligned with the line of sight. .. py:method:: model_box_inscribing_fov(observer=None, obstime=None, pad_arcsec: float = 0.0) -> dict | None 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. .. py:method:: model_box_inscribing_fov_box(observer=None, obstime=None, pad_xy_arcsec: float = 0.0, pad_z_frac: float = 0.1) -> dict | None 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. .. py:method:: fov_box_corners_world(fov_box_meta: dict | None = None) -> astropy.coordinates.SkyCoord | None .. py:method:: fov_box_corners_local_mm(fov_box_meta: dict | None = None) -> numpy.ndarray | None .. py:class:: Box(frame_obs, box_origin, box_center, box_dims, box_res) Bases: :py:obj:`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. .. py:attribute:: corners .. py:attribute:: edges .. py:attribute:: b3dtype :value: ['pot', 'nlfff'] .. py:attribute:: b3d .. py:attribute:: corona_models .. py:attribute:: corona_type :value: None .. py:property:: dims_pix .. py:property:: grid_coords .. py:method:: bounds_coords_bl_tr(pad_frac=0.0) .. py:property:: bounds_coords .. py:property:: bottom_bounds_coords .. py:property:: bottom_cea_header .. py:method:: bottom_top_header(dsun_obs=None) .. py:property:: bottom_edges .. py:property:: non_bottom_edges .. py:property:: all_edges .. py:property:: box_view_up 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.