.. include:: ../references.txt .. doctest-skip-all .. _periodic_tutorial: ****************************************************** Observing Transiting Exoplanets and Eclipsing Binaries ****************************************************** .. note:: The ``periodic`` module is new and under development. The API may change in upcoming versions of astroplan, and pull requests are welcome! .. warning:: There are currently two major caveats in the implementation of `~astroplan.EclipsingSystem`. The secondary eclipse time approximation is only accurate when the orbital eccentricity is small, and the eclipse times are computed without any barycentric corrections. The current implementation should only be used for approximate mid-eclipse times for low eccentricity orbits, with event durations longer than the barycentric correction error (<=16 minutes). Contents ======== * :ref:`periodic-transit_times` * :ref:`periodic-transit_times_via_astroquery` * :ref:`periodic-observable_transits` * :ref:`periodic-phase_constraint` .. _periodic-transit_times: Transit/Primary and secondary eclipse times =========================================== We can define the properties of an eclipsing system, such as an eclipsing binary or transiting exoplanet, using the `~astroplan.EclipsingSystem` object. Let's make an instance for the transiting exoplanet HD 209458 b, which has a period of 3.52474859 days, mid-transit time of JD=2452826.628514, and transit duration of 0.1277: .. code-block:: python >>> from astropy.time import Time >>> import astropy.units as u >>> from astroplan import EclipsingSystem >>> primary_eclipse_time = Time(2452826.628514, format='jd') >>> orbital_period = 3.52474859 * u.day >>> eclipse_duration = 0.1277 * u.day >>> hd209458 = EclipsingSystem(primary_eclipse_time=primary_eclipse_time, ... orbital_period=orbital_period, duration=eclipse_duration, ... name='HD 209458 b') Let's say we're observing on 2016 January 1, 00:00 UTC. We can compute the next transit and secondary eclipse using the `~astroplan.EclipsingSystem.next_primary_eclipse_time` and `~astroplan.EclipsingSystem.next_secondary_eclipse_time` methods, respectively: .. code-block:: python >>> observing_time = Time('2016-01-01 00:00') >>> hd209458.next_primary_eclipse_time(observing_time)