New in version 0.2.
UTC Julian day of J2000.0 coordinate epoch.
Convert B1950 epoch to J2000 epoch for equatorial coordinates.
Param: pos - object of type equ_posn giving B1950 coordinates
Returns: object of type equ_posn giving J2000 coordinates.
Note
The accuracy of this function is about 0.01 degrees.
Offset in days between UNIX time (epoch 1970/01/01) and standard Julian day.
Difference in seconds between TT and TAI times.
Convert J2000 epoch to B1950 epoch for equatorial coordinates.
Param: pos - object of type equ_posn giving J2000 coordinates
Returns: object of type equ_posn giving B1950 coordinates.
Note
The accuracy of this function is about 0.01 degrees.
Offset in days between standard Julian day and Dublin Julian day.
UTC Julian day of B1950.0 coordinate epoch.
” Velocity of light in meters/second.
The number of seconds in one day
Adds time/angle hours, minutes, seconds.
Param: source - Object of type hms represeting angle 1. Param: dest - Object of type hms represeting angle 2.
Returns object of type hms representing sum of angles.
Add seconds to time/angle hours, minutes, seconds.
Param: hms - Object of type hms representing angle. Param: seconds - Seconds offset (float) to add to angle.
Returns object of type hms representing angle + offset.
Represents UT time in calendar units.
Load date object from formatted strings.
Param: dateStr - A string of format YYYY-MM-DD giving date. Param: timeStr - A string of format HH:MM:SS.S giving time.
Convert calendar time to Julian day. Returns UTC time in Julian days (float).
Convert UTC calendar time to local calendar time.
Returns object of type zonedate representing local time.
Convert UTC calendar time to local calendar time.
Param: date - A date object representing UTC time. Param: gmtoff - Seconds offset from UTC (integer -43200 to 43200).
Returns object of type zonedate representing local time.
Convert angles float degrees to degrees, minutes, seconds.
Param: degrees - Angle in degrees (float).
Returns object of type dms representing angle.
Convert angles float degrees to hours, minutes, seconds.
Param: degrees - Angle in degrees (float).
Returns object of type hms representing angle.
Convert degres to radians.
Param: degrees - Angle in degrees (float).
Returns angle in radians (float).
Convert longitude degrees into time seconds.
Param: degrees - longitude (float degrees)
Returns: Seconds (float) offset in time for longitude.
Get direction cosines from azimuth and zenith angles. This function calculates the cosine values based on the LWA coordinate system: l = unit vector in E direction (azimuth = 90) m = unit vector in N direction (azimuth = 0) n = unit vector in zenith direction (zenith = 0, altitude = 90)
Param: posn - object of type hrz_posn giving local position
Returns a tuple (l,m,n) of float values for the direction cosines.
Represents angles in degrees, minutes, seconds.
degrees - Angle degrees (integer). minutes - Angle minutes (integer). seconds - Angle seconds (float).
Convert angles degrees, minutes, seconds to float degrees. Returns angle in degrees (float).
Convert angles degrees, minutes seconds to hours, minutes, seconds. Returns: object of type hms representing angle.
Convert angles degrees, minutes, seconds to float degrees.
Param: dms - Object of type dms representing angle.
Returns angle in degrees (float).
Convert angles degrees, minutes, seconds to radians.
Param: dms - Object of type dms representing angle.
Returns angle in radians (float).
Represents position as ecliptic longitude and latitude.
Return a tuple (lng, lat) where lng is an dms object and lat is a dms object representing longitude and latitude position coordinates.
Get equatorial coordinates from ecliptical coordinates for a given time.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Represents equatoral/celestial position coordinates.
Get angular separation from equatorial position.
Param: posn - Object of type equ_posn representing body 2 position.
Returns angular separation in degrees (float).
Return a tuple (ra, dec) where ra is an hms object and dec is a dms object representing ra and dec position coordinates.
Get position of celestial object accounting for precession. The equatorial coordinates should be for the J2000 epoch.
Param: jD - UTC Julian day (float) to measure position.
Returns: Adjusted equatorial position of object as type equ_posn.
Get ecliptical coordinates from equatorial coordinates.
Param: jD - UTC Julian day (float).
Returns object of type lnlat_posn representing eclipitcal position.
Get J2000 galactic coordinates from apparent equatorial coordinates.
Param: jD - UTC Julian day to get position.
Returns object of type gal_posn representing object’s galactic position.
Get local horizontal coordinates from equatorial/celestial coordinates.
Param: observer - Object of type lnlat_posn representing observer position. Param: jD - UTC Julian day (float).
Returns object of type hrz_posn representing local position.
Represents galactic position coordinates.
Return a tuple (lng, lat) where lng is an dms object and lat is a dms object representing galactic longitude and latitude position coordinates.
Get apparent equatorial coordinates from J2000 galactic coordinates.
Param: jD - UTC Julian day to get position.
Returns object of type equ_posn representing object’s apparent equatorial position.
Class to represent geographical position in terms of longitude, lattitude, and elevation. This is a set of geodetic coordinates based on the WGS84 model.
Get angular separation from equatorial positions.
Param: posn1 - Object of type equ_posn representing body 1 position. Param: posn2 - Object of type equ_posn representing body 2 position.
Returns angular separation in degrees (float).
Get apparent position of celestial object accounting for precession, nutation, aberration, and optionally proper motion.
Param: jD - UTC Julian day (float) to measure position. Param: proper_motion - object of type equ_posn giving object’s proper motion
(optional).
Returns: Apparent equatorial position of object as type equ_posn.
Get apparent sidereal time from Julian day.
Param: jD - UTC Julian day (float).
Returns GM apparent sidereal time (float hours).
Convert Julian day to calendar time.
Param: jD - UTC time in Julian days (float).
Returns object of type date representing UTC time.
Gets calendar time from system clock.
Returns object of type date representing UTC time.
Gets day of week from calendar time.
Param: date - Object of type date representing UTC time.
Returns day of week (0 = Sunday, 6 = Saturday).
Get ecliptical coordinates from equatorial coordinates for a given time.
Param: object_ - Object of type equ_posn representing equatorial position. Param: jD - UTC Julian day (float).
Returns object of type ecl_posn representing ecliptic position.
Get ecliptical coordinates from rectangular coordinates.
Param: rect - Object of type rect_posn representing position.
Returns object of type lnlat_posn representing ecliptical position.
Get J2000 equatorial coordinates from galactic coordinates.
Param: object_ - Object of type gal_posn representing galactic position.
Returns object of type equ_posn representing J2000 equatorial position.
Get position of celestial object accounting for aberration.
Param: jD - UTC Julian day (float) to measure aberration.
Returns: Adjusted equatorial position of object as type equ_posn.
Based on the libnova ln_get_equ_aber() function.
Get equatorial coordinates from ecliptical coordinates for a given time.
Param: object_ - Object of type lnlat_posn representing ecliptic position. Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get B1950 equatorial coordinates from galactic coordinates.
Param: object_ - Object of type gal_posn representing galactic position.
Returns object of type equ_posn representing B1950 equatorial position.
Get equatorial/celestial coordinates from local horizontal coordinates.
Param: object_ - Object of type hrz_posn representing horizontal position. Param: observer - Object of type lnlat_posn representing observer position. Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Transform rectangular coordinates to equatorial coordinates.
Param: posn - Object of type rect_posn giving position.
Returns: Object of type equ_posn giving equatorial coordinates.
Get the position of a celesital object accounting for nutation.
Param: jD - UTC Julian day (float) to measure nutation.
Returns: Adjusted equatorial position of object as type equ_posn.
Based on the AstroIDL co_nutate.pro procedure
Adjusts equatorial position of a stellar object accouting for proper motion.
Param: mean_position - J2000 equatorial mean position of object as type equ_posn. Param: proper_motion - Object of type equ_posn giving object’s proper motion
(units are deg/year).
Param: jD - UTC Julian day (float) to measure position.
Returns: Adjusted equatorial position of object as type equ_posn.
Based on pm.f, dcs2c.f, and dcc2s.f from SLALIB.
Get position of celestial object accounting for precession. Only works for converting to and from J2000 epoch.
Param: mean_position - J2000 equatorial mean position of object as type equ_posn. Param: jD - UTC Julian day (float) to measure position.
Returns: Adjusted equatorial position of object as type equ_posn.
Get position of celestial object accounting for precession.
Param: mean_position - equatorial first position of object as type equ_posn. Param: fromJD - UTC Julian day (float) of first time. Param: toJD - UTC Julian day (float) of second time.
Get galactic coordinates from B1950 equatorial coordinates.
Returns object of type gal_posn representing galactic position.
Get galactic coordinates from J2000 equatorial coordinates.
Returns object of type gal_posn representing galactic position.
Transform ECEF rectangular coordinates to geographical coordinates. Adapoted from “Satellite Orbits”, Montenbruck and Gill 2005, 5.85 - 5.88. Also see gpstk ECEF::asGeodetic() method.
Param: posn - object of type rect_posn giving position.
Returns: object of type geo_posn giving geographical coordinates.
Get local UTC offset based on Python time module and system info.
Get local horizontal coordinates from equatorial/celestial coordinates.
Param: object_ - Object of type equ_posn representing celestial position. Param: observer - Object of type lnlat_posn representing observer position. Param: jD - UTC Julian day (float).
Returns object of type hrz_posn representing local position.
Convert calendar time to Julian day.
Param: date - Object of type date representing UTC time.
Returns UTC time in Julian days (float).
Returns UTC Julian day (float) from system clock.
Gets Julian day from Unix time.
Param: time_ - Unix timet in seconds (integer)
Returns UTC Julian day (float).
Convert local calendar time to Julian day.
Param: zonedate - Object of type zonedate representing local time.
Returns UTC time in Julian days (float).
Get Jupiter’s apparent equatorial coordinates from Julian day. Accounts for aberration and precession, but not nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get Jupiter’s rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Get apparent local sidereal time from Julian day.
Param: lng - longitude degrees (float), E = positive, W = negative Param: jD - UTC Julian day (float).
Returns: Local mean sidereal time (float hours).
Get the Moon’s apparent equatorial coordinates from Julian day. Accounts for aberration and precession, but not nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get the Moon’s rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Get Mars’ apparent equatorial coordinates from Julian day. Accounts for aberration and precession, but not nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get Mars’ rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Get mean sidereal time from Julian day.
Param: jD - UTC Julian day (float).
Returns GM mean sidereal time (float hours).
Get nutation corrections for a given time.
Param: jD - UTC Julian day (float) to measure nutation.
Returns: Nutation corrections as object of type nutation.
Based on the nutate.pro and co_nutate.pro from the AstroIDL library.
Get rise, set, and transit times of a celstial object.
Param: jD - UTC Julian day (float) target time. Param: observer - object of type lnlat_posn giving observer position Param: object_ - object of type equ_posn giving target equatorial position
Caculate precession of equatorial coordinates from one epoch to another.
Param: jD1 - UTC Julian day of epoch 1. Param: pos - object of type equ_posn giving epoch 1 position Param: jD2 - UTC Julian day of epoch 2.
Returns: object of type equ_posn giving epoch 2 position.
Transform equatorial coordinates to rectangular coordinates.
Param: posn - Object of type equ_posn giving position.
Returns: Object of type rect_posn giving rectangular coordinates (normallized to 1).
Transform geographical coordinates to ECEF rectangular coordinates. Adopted from “Satellite Orbits”, Montenbruck and Gill 2005, 5.83 - 5.84. Also see gpstk Geodetic::asECEF() method.
Param: posn - object of type geo_posn giving geographical coordinates.
Returns: object of type rect_posn giving ECEF position.
Get relative position angle from equatorial positions.
Param: posn1 - Object of type equ_posn representing body 1 position. Param: posn2 - Object of type equ_posn representing body 2 position.
Returns position angle in degrees (float).
Based on dpav.f from SLALIB.
Get Saturn’s apparent equatorial coordinates from Julian day. Accounts for aberration and precession, but not nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get Saturn’s rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Get Sun’s apparent equatorial coordinates from Julian day. Accounts for aberration and precession, and nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get Sun’s rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Return the current time taken from the system clock as a TAI MJD (float).
Gets Unix time from Julian day.
Param: jD - UTC Julian day (float).
Returns Unix timet in seconds (integer).
Get Venus’ apparent equatorial coordinates from Julian day. Accounts for aberration and precession, but not nutation.
Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
Get Venus’ rise, transit, set times from Julian day.
Param: jD - UTC Julian day (float). Param: observer - Object of type lnlat_posn representing observer position.
Represents times/angles in hours, minutes, seconds.
Convert angles hours, minutes, seconds to float degrees. Returns angle in degrees (float).
Convert angle hours, minutes, seconds to degrees, minutes, seconds. Returns: object of type dms representing angle.
Convert angle hours, minutes, seconds to seconds. Returns: time/angle as seconds.
Convert angles hours, minutes, seconds to float degrees.
Param: hms - Object of type hms representing angle.
Returns angle in degrees (float).
Convert angles hours, minutes, seconds to float radians.
Param: hms - Object of type hms representing angle.
Returns angle in radians (float).
Convert hours, minutes, seconds to seconds.
Param: hms - object of type hms representing time/angle.
Returns: Seconds (float) offset of time/angle.
Represents horizontal local position coordinates. LWA measures azimuth angle clockwise from north to east, with due north equal to 0 degrees. Also, method for using zenith angle instead of altitude angle have been added.
Get direction cosines from horizontal coordinates.
Get equatorial/celestial coordinates from local horizontal coordinates.
Param: observer - Object of type lnlat_posn representing observer position. Param: jD - UTC Julian day (float).
Returns object of type equ_posn representing equatorial position.
If value is None, returns position zenith angle (float degrees [0, 180]) Otherwise, sets the altitude according to the zenith angle value.
Get cardinal/ordinal azimuth direction.
Param: pos - Object of type hrz_posn giving local position.
Returns string giving direction.
Get modified julian day value from julian day value.
Param: jd - julian day (should be >= 2400000.5)
Returns: Modified julian day.
Convert Julian days into seconds.
Param: jD - Julian days (float).
Returns: Seconds as a float.
Get the number of leap seconds for given UTC time value.
Returns: The number of leap seconds (float) for the UTC time.
Represents position coordinates in latitude and longitude. When representing a geographical location, the longitude is negative when measured west of GM and positive is measured east of GM.
Return a tuple (lng, lat) where lng is an dms object and lat is a dms object representing longitude and latitude position coordinates.
Get julian day value from modified julian day value.
Param: mjd - modified julian day (should be >= 0.0)
Returns: Julian day.
Provides nutation information in longitude and obliquity.
Return a tuple (lng, obl, ecl) where lng is an dms object, obl is a dms object, and ecl is a dms object representing nutation in longitude and obliquity, and obliquity of the ecliptic.
Convert radians to degrees.
Param: radians - Angle in radians (float).
Returns angle in degrees (float).
Convert angles float radians to degrees, minutes, seconds.
Param: radians - Angle in radians (float).
Returns object of type dms representing angle.
Convert angles float radians to hours, minutes, seconds.
Param: radians - Angle in radians (float).
Returns object of type hms representing angle.
Put angle into range [0, 360].
Param: degrees - large angle (float degrees)
Returns: angle in range (float degrees)
Put an hour time value into the correct range [0.0, 24.0].
Represents rectangular/Cartesian position coordinates.
Represents ephemeris rist, set, and transit times.
Return a tuple (rise, set, transit) where all three are date objects representing the ephemeris times.
Convert seconds into julian days.
Param: secs - seconds (float)
Returns: Julian days as a float.
Get the TT JD time value for a given TAI JD time value.
Param: taiJD - The TAI JD time (float).
Returns: The TT JD value (float).
Get the UTC JD time value for a given TAI JD time value.
Returns: The UTC JD value (float).
Get UNIX time value for a given TAI MJDvalue.
Param: taiMJD - The TAI MJD time (float).
Returns: The UNIX time
Get the UTC JD time value for a given TAI MJD value.
Param: mjdTAI - The TAI MJD time (float).
Returns: The UTC JD value (float).
Get the TAI JD time value for a given TT JD time value.
Param: ttJD - The TT JD time (float).
Returns: The TAI JD value (float).
Get the TDB JD time value for a given TT JD time value. Adopted from “Astronomical Almanac Supplement”, Seidelmann 1992, 2.222-1.
Param: ttJD - The TT JD time (float).
Returns: The TDB JD value (float).
Get the UTC JD time value for a given TT JD time value.
Param: ttJD - The TT JD time (float).
Returns: The UTC JD value (float).
Get the TAI MJD time value for a given UNIX time value.
Param: unixTime - the UNIX time (int/float)
Returns: The TAI MJD value.
Get the UTC JD time value for a given UNIX time value.
Param: unixTime - the UNIX time (int/float)
Returns: The UTC JD value.
Get the TAI JD time value for a given UTC JD time value.
Returns: The TAI JD value (float).
Get the TT JD time value for a given UTC JD time value.
Param: utcJD - The UTC JD time (float).
Returns: The TT JD value (float).
Get the TAI MJD time value for a given UTC JD value.
Param: utcJD - The UTC JD time (float).
Returns: The TAI MJD value.
Get UNIX time value for a given UTC JD value.
Param: utcJD - The UTC JD time (float).
Returns: The UNIX time
Represents local time in calendar units.
Convert local calendar time to UTC calendar time. Returns object of type date representing UTC time.
Convert calendar time to Julian day. Returns UTC time in Julian days (float).
Convert local calendar time to UTC calendar time.
Param: zonedate - Object of type zonedate representing local time.
Returns object of type date representing UTC time.