UVIS Geometry#
The main geometry object is a high-level interface to the geometric computations and stores the relevant geometric information for a given observation epoch. It relies on a low-level geometric engine described in the next section and on a set of utilities based on the NAIF SPICE toolkit wrapped in Python by the SpiceyPy library.
This class allows the observation to be plotted with the .plot() method defined in the cassini_upyp.geometry.plotting module, which provides a convenient interface to the plotting utilities described in the Plotting section.
- class cassini_upyp.geometry.geometry.Geometry(ET, meta_kernel=None, other_bodies=array(['SATURN', 'EARTH', 'SUN', 'TITAN', 'RHEA', 'IAPETUS', 'DIONE', 'TETHYS', 'ENCELADUS', 'MIMAS'], dtype='<U9'), main=None, u=None, target=None, offset=array([0, 0, 0]))#
Bases:
objectCompute and store Cassini/UVIS observation geometry using SPICE.
This class is a high-level container around a lower-level geometry engine (
Geometer). It loads the required SPICE kernels (optionally via an auto-selected kernel list), computes target apparent geometry as seen from Cassini at a given ephemeris time, and exposes precomputed quantities in both Cartesian (J2000) and sky coordinates (RA/DEC). When a UVIS observation is provided, the class also computes the UVIS field-of-view geometry, line-of-sight intersections, and star statistics per pixel.The object can be created as a “main” geometry instance (responsible for kernel loading/clearing) or as a nested instance used for secondary targets in the field of view. In the latter case, the code uses recursion.
- Parameters:
ET (float) – Ephemeris time (seconds past J2000, TDB) at which geometry is evaluated.
meta_kernel (str or list[str] or None, optional) – SPICE meta-kernel path, or explicit list of kernels to load. If
Noneand the instance is “main”, kernels are selected automatically forETusingmetakernel().other_bodies (sequence[str] or None, optional) – List of additional bodies to search for in the field of view (case insensitive). Only used for the main instance. Default is defined by
FOV_objectslist in the user configuration file plotting.toml.main (Geometry or None, optional) – If
None, this instance is considered the main one and is responsible for loading/clearing SPICE kernels. If aGeometryis provided, this instance acts as a child geometry (e.g., for other targets in the FOV).u (UVIS_Observation or None, optional) – Observation object providing target name, year/DOY, instrument frame and pixel corner vectors. If provided, UVIS-specific geometry products are computed.
target (str or None, optional) – Target body name (SPICE name). If
None, the target is taken fromu.target. A target must be provided either explicitly or viau.offset (array-like, optional) – Optional offset vector passed to the geometry engine to be applied on the main target body, for example to compensate some known bias. Default is
(0, 0, 0)as it should remain unused.
- Variables:
UTC_time (str) – UTC representation of
ET(SPICEet2utcwith calendar format).target_center (dict) – Target center direction as seen from the observer. Keys include
'XYZ'(J2000 unit vector) and'RADEC'(degrees).target_limb (dict) – Target limb curve points. Keys include
'XYZ'and'RADEC'.terminator (dict) – Terminator curve points (absent for target
'SUN').night_side (dict) – Night-side limb curve points (absent for target
'SUN').angular_diameter (float) – Apparent angular diameter of the target limb (same units as
max_angular_diameter()).used_pixels (pixels,) – UVIS pixel corners for the full and binned fields of view (J2000 + RA/DEC).
used_pixels_LOS (pixels_LOS,) – Line-of-sight intersection products returned by the geometry engine.
pixel_stars (list[dict]) – Per-binned-pixel star statistics (count, magnitude, visibility flags).
Notes
When this instance is “main”, SPICE kernels are loaded during initialization and cleared via
spice.kclear()at the end of__init__.The class currently performs substantial computation in
__init__and therefore may be expensive to instantiate.
See also
cassini_upyp.kernellib.metakernel()Kernel selection helper returning a list of kernels to load.
cassini_upyp.geometry.spice_engine.GeometerLow-level geometry engine used to compute limb/LOS products.