Contents:
Routines to make a chart of upcoming transit events. The main function to call is transitChart(), which has an example in its documentation. A fully automated chart-maker can be found in makeCharts()
REQUIREMENTS: | PyEphem – http://rhodesmill.org/pyephem/ Numpy – http://numpy.org/ Numerical analysis routines – For importing planet-class objects. |
---|---|
SEE ALSO: | |
TO-DO LIST: | Print uncertainties in ephemeris when they’re sufficiently large |
2010-10-11 23:06 IJC: Updated with La Palma location.
2010-03-23 09:37 IJC: Written by IJC to duplicate Josh Winn’s page @ MIT.
2011-08-09 13:21 IJMC: Copied over jd2gd() and gd2jd().
2011-09-30 11:01 IJMC: Added moon separation.
Examples : | print gd2jd('Aug 11 2007') #---------------> 2454324.5
print gd2jd('Aug 11 2007, 12:00 PST') #-----> 2454324.29167
print gd2jd('12:00 PM, January 1, 2000') #--> 2451545.0
|
---|---|
Requirements : | matplotlib |
See ALSO: |
Return airmass and sun altitude at a set of times. INPUTS:
JD – a sequence of times target – an ephem.star-class object obs – an ephem.Observer-class object
Objects w/airmass>9.99 (or below the horizon) are set to 9.99
Returns the angle between a target and the moon (in radians).
Inputs : |
|
---|
Compute perimeter of an ellipse given its semimajor axis and eccentricity. This is only accurate to a few percent.
Compute duration of transit, in days. Units of inputs should be:
Rp – Jupiter Radii
depth – (none)
a – AU
ecc– (none)
P – days
inc– degrees
If no arguments passes, get info for the next 10 transits. If one (Julian) Date entered, print transits until that date. If two (Julian) Dates entered, print transits between those dates.
If keyword eclipse==True, get the Eclipse times instead.
Check if planet object has the necessary fields, and that they are non-empty.
Examples : | print jd2gd(2454324.5) #--> 2007-08-12 00:00:00
print jd2gd(2451545) #--> 2000-01-01 12:00:00
|
---|---|
See ALSO: |
Make transit charts for specified observatories for all planets.
Options : |
|
---|---|
Requirements : | Numerical analysis routines, datetime, os |
See_also : |
Return JD of the next eclipse of a planet after a given JD. If jd==None, the current date is used.
Note that this only works for planets on circular orbits – eccentric orbits will be given an incorrect Eclipse time!
Return JD of the next transit of a planet after a given JD. If jd==None, the current date is used.
Inputs : |
date1, date2 – date strings (e.g., of the form “YYYY-MM-DD”)
airmax – (float) maximum “good” airmass twilight – (float) how many degrees below the horizon the sun should be tpad – (float) number of hours to pad ingress and egress
eclipse – (bool) – if True, print times of eclipses, not of transits. delim – (str) – character to use for output table delimiting
|
---|---|
Example : | import transittime as tt
class planet: % Simplest valid planet class
def __init__(self):
return
p = planet()
p.per = 1.58040482
p.tt, p.t14 = 2454980.7487955, 0.03661806
p.ra_string, p.dec_string = '17:15:18.94', '04:57:49.70'
p.name = 'GJ 1214 b'
text = tt.transitChart(p, '2010-01-01','2010-06-30')
|
Example : | import analysis as an # requires :doc:`analysis`
import transittime as tt
from numpy import array
planet_names = an.getobj()
all_planets = map(an.getobj, planet_names)
transit_flag = array([p.transit==1 for p in all_planets])
transiters = array(all_planets)[transit_flag]
text = tt.transitChart(transiters, '2011-06-01', '2012-08-01')
|
Notes : | Always check transit predictions with at least two independent tools! |