Spacecraft Roll Angle and Apparent Solar Radius from Spiceypy
Erica Lastufka

Categories

  • posts

Tags

  • SPICE
  • STIX
  • WCS

The as-flown attitude of an orbiting spacecraft affects its local coordinate system. A roll angle correction must be applied to imaging data in order to recover the proper coordinates. Spacecraft attitude data, both predicted and as-flown, are stored in the SPICE kernels.

Another factor that depends on the spacecraft location (especially for Solar Orbiter’s highly elliptical orbit) is the apparent solar radius; the closer to the Sun, the larger the observed solar radius. To compare data from different dates, the apparent solar radius must be taken into account.

Roll angle correction (not yet implemented in the STIX data pipeline) can be done via SSWIDL’s get_sunspice_roll.pro function. The Sunspice package is an IDL wrapper for the SPICE software, written in C. Similarly, the Spicypy package is a wrapper written in Python.

I implemented a Python version of get_sunspice_roll.pro and added it to stix_utils.py. With Spicepy it is important to be aware that many functions (perhaps only those that use spice_error_check, although that is most of them) require that the working directory is the kernel directory or else the needed files risk not being found - annoying behaviour but hopefully something that can be eventually written out. Many thanks to M. Sitjà for assistance understanding the finer details of reference frames and ID codes.

For the STIX back-projection dataset of ~700 events spanning from January - September 2021, the difference between roll-angle (in degrees) calculated by Python and IDL was on average 8x10-6 with a standard deviation of 2x10-4 ; negligible.

Another addition to stix_utils.py was get_rsun_apparent(), which gets the apparent solar radius given a datetime and an optional observer.

Illustrations of Solar Orbiter’s as-flown roll angle and apparent solar radius for the last year are shown below.