histastro.coordinates module
Coordinate transformations and related functions for HistAstro.
- histastro.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:
tuple (float,float)
References
[Explanatory Supplement to the Astronomical Almanac 3rd Ed, Eq.14.43](https://aa.usno.navy.mil/publications/docs/exp_supp.php)
- histastro.coordinates.eq2ecl(ra, dec, eps)[source]
Convert equatorial coordinates to ecliptical.
- Parameters:
ra (float) – Right ascension (rad).
dec (float) – Declination (rad).
eps (float) – Obliquity of the ecliptic (rad).
- Returns:
tuple containing (lon, lat):
lon (float): Ecliptical longitude (rad).
lat (float): Ecliptical latitude (rad).
- Return type:
tuple (float,float)
- histastro.coordinates.geoc2topoc_ecl(gcLon, gcLat, gcDist, gcRad, eps, lst, obsLat, obsEle=0, debug=False)[source]
Convert spherical ecliptical coordinates from the geocentric to the topocentric system.
- Parameters:
gcLon (float) – Geocentric ecliptic longitude (rad).
gcLat (float) – Geocentric ecliptic latitude (rad).
gcDist (float) – Geocentric distance (AU).
gcRad (float) – Geocentric semi-diameter (rad).
eps (float) – Obliquity of the ecliptic (rad).
lst (float) – Local sidereal time (rad).
obsLat (float) – Geographical latitude of the observer (rad).
obsEle (float) – Altitude/elevation of the observer above sea level (metres, optional, default value = 0).
debug (float) – Print debug output (True/False, optional, default value = True).
- Returns:
tuple containing (tcLon, tcLat, tcRad):
tcLon (float): Topocentric ecliptic longitude (rad).
tcLat (float): Topocentric ecliptic latitude (rad).
tcRad (float): Topocentric semi-diameter (rad).
- Return type:
tuple (float,float,float)
- histastro.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:
float
References
Seidelman 1992, Eq. 3.222-1.
- histastro.coordinates.par2horiz(ha, dec, phi)[source]
Convert parallactic coordinates to horizontal.
- Parameters:
ha (float) – Hour angle (rad).
dec (float) – Declination (rad).
phi (float) – Geographical latitude (rad, N>0).
- Returns:
tuple containing (az, alt):
az (float): Azimuth (rad, S=0).
alt (float): Altitude (rad).
- Return type:
tuple (float,float)
- histastro.coordinates.precessHip(jd, ra, dec)[source]
Compute precession in equatorial coordinates from the Hipparcos equinox (J2000) to that of the specified JD.
- Parameters:
jd (float) – Julian day (days).
ra (float) – Right ascension (rad).
dec (float) – Declination (rad).
- Returns:
tuple containing (raTarget, decTarget):
raNew (float): Right ascension for the target equinox (rad).
decNew (float): Declination for the target equinox (rad).
- Return type:
tuple (float,float)
- histastro.coordinates.properMotion(startJD, targetJD, ra, dec, pma, pmd)[source]
Compute the proper motion from startJD to targetJD for the given positions and proper motions.
- Parameters:
startJD (float) – Julian day of the initial epoch (days).
targetJD (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 (raTarget, decTarget):
raTarget (float): Right ascension for the target epoch (rad).
decTarget (float): Declination for the target epoch (rad).
- Return type:
tuple (float,float)