Ska.Sun

Utility for calculating sun position and pitch angle.

Functions

Ska.Sun.position(time)

Calculate the sun position at the given time.

Code modified from http://idlastro.gsfc.nasa.gov/ftp/pro/astro/sunpos.pro

Example:

>>> import Ska.Sun
>>> Ska.Sun.position('2008:002:00:01:02')
(281.90344855695275, -22.9892737322084)
Parameters:time – Input time (Chandra.Time compatible format)
Return type:RA, Dec in decimal degrees (J2000).
Ska.Sun.pitch(ra, dec, time)

Calculate sun pitch angle for the given spacecraft attitude ra, dec at time.

Example:

>>> Ska.Sun.pitch(10., 20., '2009:001:00:01:02')
96.256434327840864
Parameters:
  • ra – right ascension
  • dec – declination
  • time – time (any Chandra.Time format)
Returns:

sun pitch angle (deg)

Ska.Sun.nominal_roll(ra, dec, time=None, sun_ra=None, sun_dec=None)

Calculate nominal roll angle for the given spacecraft attitude ra, dec at time. Optionally one can provide explicit values of sun_ra and sun_dec instead of time.

Example:

>>> Ska.Sun.nominal_roll(205.3105, -14.6925, time='2011:019:20:51:13')
68.830209134280665    # vs. 68.80 for obsid 12393 in JAN1711A
Parameters:
  • ra – right ascension
  • dec – declination
  • time – time (any Chandra.Time format) [optional]
  • sun_ra – Sun right ascension (instead of time)
  • sun_dec – Sun declination (instead of time)
Returns:

nominal roll angle (deg)

Ska.Sun.sph_dist(a1, d1, a2, d2)

Calculate spherical distance between two sky positions. Not highly accurate for very small angles. This function is deprecated, use Ska.astro.sph_dist() instead.

Parameters:
  • a1 – RA position 1 (deg)
  • d1 – dec position 1 (deg)
  • a2 – RA position 2 (deg)
  • d2 – dec position 2 (deg)
Return type:

spherical distance (deg)

Table Of Contents

Previous topic

Ska.report_ranges

Next topic

Ska.Table