idlastro / Astronomical Utilities: CO_NUTATE

[Source code]

NAME
CO_NUTATE
PURPOSE
Calculate changes in RA and Dec due to nutation of the Earth's rotation
XPLANATION
Calculates necessary changes to ra and dec due to
the nutation of the Earth's rotation axis, as described in Meeus, Chap 23.
Uses formulae from Astronomical Almanac, 1984, and does the calculations
in equatorial rectangular coordinates to avoid singularities at the
celestial poles.
ALLING SEQUENCE
CO_NUTATE, jd, ra, dec, d_ra, d_dec, [EPS=, D_PSI =, D_EPS = ]
NPUTS
JD: Julian Date [scalar or vector]
RA, DEC : Arrays (or scalars) of the ra and dec's of interest
ote: if jd is a vector, ra and dec MUST be vectors of the same length.
UTPUTS
d_ra, d_dec: the corrections to ra and dec due to nutation (must then
                            be added to ra and dec to get corrected values).
PTIONAL OUTPUT KEYWORDS
EPS: set this to a named variable that will contain the obliquity of the 
         ecliptic.
D_PSI: set this to a named variable that will contain the nutation in the
       longitude of the ecliptic
D_EPS: set this to a named variable that will contain the nutation in the
                   obliquity of the ecliptic
XAMPLE
(1) Example 23a in Meeus: On 2028 Nov 13.19 TD the mean position of Theta
    Persei is 2h 46m 11.331s 49d 20' 54.54".    Determine the shift in 
    position due to the Earth's nutation.
    IDL> jd = JULDAY(11,13,2028,.19*24)       ;Get Julian date
    IDL> CO_NUTATE, jd,ten(2,46,11.331)*15.,ten(49,20,54.54),d_ra,d_dec    
          ====> d_ra = 15.843"   d_dec = 6.217"
ROCEDURES USED
NUTATE 
EVISION HISTORY
Written  Chris O'Dell, 2002
Vector call to NUTATE   W. Landsman   June 2002
Fix when JD is 1 element vector, and RA,Dec are vectors WL  May 2013