def apparent_latitude(t='now'): """ Returns the Sun's apparent latitude, referred to the true equinox of date. Corrections for nutation and aberration (for Earth motion) are included. Parameters ---------- t : {parse_time_types} Time to use in a parse-time-compatible format """ time = parse_time(t) sun = SkyCoord(0 * u.deg, 0 * u.deg, 0 * u.AU, frame='hcrs', obstime=time) coord = sun.transform_to(GeocentricMeanEcliptic(equinox=time)) # Astropy's GeocentricMeanEcliptic does not include nutation, but the contribution is negligible lat = coord.lat return Latitude(lat)
def true_latitude(t='now'): """ Returns the Sun's true geometric latitude, referred to the mean equinox of date. No corrections for nutation or aberration are included. Parameters ---------- t : {parse_time_types} Time to use in a parse-time-compatible format """ time = parse_time(t) sun = SkyCoord(0 * u.deg, 0 * u.deg, 0 * u.AU, frame='hcrs', obstime=time) coord = sun.transform_to(GeocentricMeanEcliptic(equinox=time)) # Astropy's GeocentricMeanEcliptic includes aberration from Earth motion, but the contribution # is negligible lat = coord.lat return Latitude(lat)
def apparent_longitude(t='now'): """ Returns the Sun's apparent longitude, referred to the true equinox of date. Corrections for nutation and aberration (for Earth motion) are included. Parameters ---------- t : {parse_time_types} Time to use in a parse-time-compatible format Notes ----- The nutation model is IAU 2000A nutation with adjustments to match IAU 2006 precession. """ time = parse_time(t) sun = SkyCoord(0 * u.deg, 0 * u.deg, 0 * u.AU, frame='hcrs', obstime=time) coord = sun.transform_to(GeocentricMeanEcliptic(equinox=time)) # Astropy's GeocentricMeanEcliptic already includes aberration, so only add nutation jd1, jd2 = get_jd12(time, 'tt') nut_lon, _ = erfa.nut06a(jd1, jd2) * u.radian lon = coord.lon + nut_lon return Longitude(lon)