astrotool.coordinates module
Coordinate transformations and related functions for AstroTool.
- astrotool.coordinates.ecl2eq(lon, lat, eps)[source]
Convert (geocentric) spherical ecliptical coordinates to spherical equatorial coordinates.
- Parameters:
lon (float) – Ecliptical longitude (rad).
lat (float) – Ecliptical latitude (rad).
eps (float) – Obliquity of the ecliptic (rad).
- Returns:
tuple containing (ra, dec):
ra (float): Right ascension (rad).
dec (float): Declination (rad).
- Return type:
References
- astrotool.coordinates.geoc2topoc_ecl(lon_gc, lat_gc, dist_gc, rad_gc, eps, lst, lat_obs, ele_obs=0, debug=False)[source]
Convert spherical ecliptical coordinates from the geocentric to the topocentric system.
- Parameters:
lon_gc (float) – Geocentric ecliptic longitude (rad).
lat_gc (float) – Geocentric ecliptic latitude (rad).
dist_gc (float) – Geocentric distance (AU).
rad_gc (float) – Geocentric semi-diameter (rad).
eps (float) – Obliquity of the ecliptic (rad).
lst (float) – Local sidereal time (rad).
lat_obs (float) – Geographical latitude of the observer (rad).
ele_obs (float) – Altitude/elevation of the observer above sea level (metres, optional, default value = 0).
debug (bool) – Print debug output (True/False, optional, default value = True).
- Returns:
tuple containing (lon_tc, lat_tc, rad_tc):
lon_tc (float): Topocentric ecliptic longitude (rad).
lat_tc (float): Topocentric ecliptic latitude (rad).
rad_tc (float): Topocentric semi-diameter (rad).
- Return type:
- astrotool.coordinates.obliquity(jd)[source]
Compute the obliquity of the ecliptic in radians from the JD(E).
- Parameters:
jd (float) – Julian day (days).
- Returns:
eps: Obliquity of the ecliptic (rad).
- Return type:
References
Seidelman 1992, Eq. 3.222-1.
- astrotool.coordinates.par2horiz(ha, dec, phi)[source]
Convert parallactic coordinates to horizontal.
- astrotool.coordinates.precess_from_2000(jd, ra, dec)[source]
Compute precession in equatorial coordinates from J2000 to that of the specified JD.
J2000 is the equinox of many catalogues, including the Hipparcos one.
- Parameters:
jd (float) – Julian day (days).
ra (float) – Right ascension (rad).
dec (float) – Declination (rad).
- Returns:
tuple containing (ra_new, dec_new):
ra_new (float): Right ascension for the target equinox (rad).
dec_new (float): Declination for the target equinox (rad).
- Return type:
- astrotool.coordinates.proper_motion(jd_start, jd_target, ra, dec, pma, pmd)[source]
Compute the proper motion from jd_start to jd_target for the given positions and proper motions.
- Parameters:
jd_start (float) – Julian day of the initial epoch (days).
jd_target (float) – Julian day of the target epoch (days).
ra (float) – Right ascension (numpy array, rad).
dec (float) – Declination (numpy array, rad).
pma (float) – Proper motion in right ascension (numpy array, rad/yr).
pmd (float) – Proper motion in declination (numpy array, rad/yr).
- Returns:
tuple containing (ra_target, dec_target):
ra_target (float): Right ascension for the target epoch (rad).
dec_target (float): Declination for the target epoch (rad).
- Return type: