Nutation¶
- PyAstronomy.pyasl.nutate(jd, radian=False, plot=False)¶
Computes the Earth’s nutation in longitude and obliquity for a given (array) of Julian date.
Warning
The output of the IDL routine is in units of arcseconds, whereas the default if this routine returns degrees.
- Parameters
- jdfloat
The Julian date
- radianboolean, optional
Results are returned in radian instead of in degrees. The default is False.
- plotboolean, optional
Results are plotted. The default is False.
- Returns
- Longitudefloat
The nutation in longitude (in deg by default).
- Obliquityfloat
The nutation in latitude (in deg by default).
Notes
Note
This function was ported from the IDL Astronomy User’s Library.
- IDL - Documentation
- NAME:
NUTATE
- PURPOSE:
Return the nutation in longitude and obliquity for a given Julian date
- CALLING SEQUENCE:
NUTATE, jd, Nut_long, Nut_obliq
- INPUT:
jd - Julian ephemeris date, scalar or vector, double precision
- OUTPUT:
Nut_long - the nutation in longitude, same # of elements as jd Nut_obliq - nutation in latitude, same # of elements as jd
- EXAMPLE:
- Find the nutation in longitude and obliquity 1987 on Apr 10 at Oh.
This is example 22.a from Meeus
IDL> jdcnv,1987,4,10,0,jul IDL> nutate, jul, nut_long, nut_obliq
==> nut_long = -3.788 nut_obliq = 9.443
- Plot the large-scale variation of the nutation in longitude
during the 20th century
IDL> yr = 1900 + indgen(100) ;Compute once a year IDL> jdcnv,yr,1,1,0,jul ;Find Julian date of first day of year IDL> nutate,jul, nut_long ;Nutation in longitude IDL> plot, yr, nut_long
This plot will reveal the dominant (18.6 year) period, but a finer grid is needed to display the shorter periods in the nutation.
- METHOD:
Uses the formula in Chapter 22 of ``Astronomical Algorithms’’ by Jean Meeus (1998, 2nd ed.) which is based on the 1980 IAU Theory of Nutation and includes all terms larger than 0.0003”.
- PROCEDURES CALLED:
POLY() (from IDL User’s Library) CIRRANGE, ISARRAY() (from IDL Astronomy Library)
- REVISION HISTORY:
Written, W.Landsman (Goddard/HSTX) June 1996 Converted to IDL V5.0 W. Landsman September 1997 Corrected minor typos in values of d_lng W. Landsman December 2000 Updated typo in cdelt term December 2000 Avoid overflow for more than 32767 input dates W. Landsman January 2005
Example: nutate¶
from __future__ import print_function, division
from PyAstronomy import pyasl
import datetime
import numpy as np
# Convert calendar date into JD
# use the datetime package
jd = datetime.datetime(2013, 4, 16)
jd = pyasl.jdcnv(jd)
print("Nutation for the date.")
res = pyasl.nutate(jd)
print("JD = " + str(jd) + ", Longitude = " + str(res[0]) +
", Obliquity = " + str(res[1]))
# Get nutation for an array of JDs.
startjd = datetime.datetime(2013, 4, 16)
endjd = datetime.datetime(2013, 6, 16)
startjd = pyasl.jdcnv(startjd)
endjd = pyasl.jdcnv(endjd)
jds = np.arange(startjd, endjd, .5)
print()
print("Plot the results")
res = pyasl.nutate(jds, plot=True)
print("Longitude: ", res[0])
print("Obliquity: ", res[1])
- PyAstronomy.pyasl.co_nutate(jd, ra, dec, radian=False, plot=False, full_output=False)¶
Compute the changes in RA and DEC due to the Earth’s nutation.
- Parameters
- jdfloat or array
The Julian date. If given as array, its size must match that of ra and dec.
- rafloat or array
The right ascension in degrees. If array, it must be same size as dec.
- decfloat or array
The declination in degrees. If array, it must be same size as ra.
- radianboolean, optional
Results are returned in radian instead of in degrees. The default is False.
- plotboolean, optional
If True, the results are plotted. For single value jd, the change in ra and dec is plotted versus ra and dec. For an array of JDs, ra and dec is plotted versus JD. The default is False
- full_outputboolean, optional
If True, the result will also contain the obliquity of the ecliptic, the nutation in the longitude and the nutation in the obliquity of the ecliptic. The default is False.
- Returns
- dRafloat or array
The change in right ascension [by default in deg].
- dDecfloat or array
The change in declination [by default in deg].
- True obliquityfloat, optional
The true obliquity of the ecliptic [by default in deg]. Only if full_output is True.
- dLongfloat or array, optional
The nutation in longitude [by default in deg]. Only if full_output is True.
- dObliquityfloat or array, optional
The nutation in the obliquity of the ecliptic [by default in deg]. Only if full_output is True.
Notes
Note
This function was ported from the IDL Astronomy User’s Library.
- IDL - Documentation
- NAME:
CO_NUTATE
- PURPOSE:
Calculate changes in RA and Dec due to nutation of the Earth’s rotation
- EXPLANATION:
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.
- CALLING SEQUENCE:
CO_NUTATE, jd, ra, dec, d_ra, d_dec, [EPS=, D_PSI =, D_EPS = ]
- INPUTS
JD: Julian Date [scalar or vector] RA, DEC : Arrays (or scalars) of the ra and dec’s of interest
Note: if jd is a vector, ra and dec MUST be vectors of the same length.
- OUTPUTS:
- 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).
- OPTIONAL 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
- EXAMPLE:
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”
- PROCEDURES USED:
NUTATE
- REVISION HISTORY:
Written Chris O’Dell, 2002 Vector call to NUTATE W. Landsman June 2002
Example: co_nutate¶
from __future__ import print_function, division
from PyAstronomy import pyasl
import datetime
import numpy as np
# Convert calendar date into JD
# use the datetime package
jd = datetime.datetime(2013, 4, 16)
jd = pyasl.jdcnv(jd)
# Specify RA and DEC (degrees)
ra = 10.
dec = 30.
print("Get change in RA and DEC due to Earth's nutation for JD = "
+ str(jd))
print(pyasl.co_nutate(jd, ra, dec))
print()
print("Get change for several RAs and DECs for the same JD")
ra = np.arange(0., 160., 20.)
dec = np.arange(-80., 80., 20.)
res = pyasl.co_nutate(np.repeat(jd, ra.size), ra, dec)
print(res[0], res[1])
print()
print("Get change for several RAs and DECs for different JDs")
jds = np.arange(jd, jd+ra.size, 1)
res = pyasl.co_nutate(jds, ra, dec)
print("JD delta(RA) delta(DEC)")
for i in range(ra.size):
print("%12.5f %8.5f %8.5f" % (jds[i], res[0][i], res[1][i]))