Get started

Planner of Transits Observation - PTO

This is a tutorial example for using PTO. The purpose of this code is to calculate transit windows (emission observations to be added soon) for given time period and location to observe from. It can be used for proposal writing, and further for preparation of the observations.

The main steps in PTO are:

  1. Load a catalog of planets

  2. Filter the catalog to desired targets

  3. Calculate transit windows

  4. Plot observing conditions for each night for given location

Tip: Generally, most functions and methods are well documented. You can get a hint by hovering mouse over the function name. You can also get the documentation by help(function_name).

Tip: Full documentation is available at PTO documentation.

Lets first supress warnings - most of the warnings are safe to ignore, and include performance warnings or very fine precision warnings outside the level needed for this code.

[1]:
import warnings
warnings.filterwarnings('ignore')

1. Load a catalog of planets

PTO allows the user to load a catalog of exoplanets. Different databases will be added, but we will use the default NASA composite table. To do so, we can do:

[2]:
from PTO.database.NASA_exoplanet_archive import NASA_Exoplanet_Archive_CompositeDefault

Catalog = NASA_Exoplanet_Archive_CompositeDefault()
Catalog.load_API_table()
  INFO     | Trying to load NASA Exoplanet Archive Composite table
  INFO     | Filename: /media/chamaeleontis/Observatory_main/Code/observations_transits/PTO/docs/source/saved_files/CatalogComposite.pkl

Logging:

A logger is implemented in PTO to showcase progress of the code run. These are divided in different levels, based on importance. For now, feel free to ignore the messages.

Auto-save:

As the TAP queries take some time, many functions and classes have a auto-save/load feature. In those cases a time interval (typically 1 week) is given to rerun all queries.

Keys available

As there are many different parameters, few convenience functions are provided to list all available keys in the main table.

To print all keys, you can use Catalogue.print_all_keys(). For a particular set of keys, you can use: - Catalogue.print_position_keys()

  • Catalogue.print_system_keys()

  • Catalogue.print_star_keys()

  • Catalogue.print_planet_keys()

  • Catalogue.print_discovery_keys()

  • Catalogue.print_magnitude_keys()

  • Catalogue.print_flag_keys()

[3]:
Catalog.print_all_keys()
  PRINT    | =========================
  PRINT    | Position keys:
  PRINT    | =========================
  PRINT    | Position.Declination
  PRINT    | Position.Declination.Reference
  PRINT    | Position.Declination.Error.Upper
  PRINT    | Position.Declination.Error.Lower
  PRINT    | Position.EclipticLatitude
  PRINT    | Position.EclipticLatitude.Reference
  PRINT    | Position.EclipticLatitude.Error.Upper
  PRINT    | Position.EclipticLatitude.Error.Lower
  PRINT    | Position.EclipticLongitude
  PRINT    | Position.EclipticLongitude.Reference
  PRINT    | Position.EclipticLongitude.Error.Upper
  PRINT    | Position.EclipticLongitude.Error.Lower
  PRINT    | Position.GalacticLatitude
  PRINT    | Position.GalacticLatitude.Reference
  PRINT    | Position.GalacticLatitude.Error.Upper
  PRINT    | Position.GalacticLatitude.Error.Lower
  PRINT    | Position.GalacticLongitude
  PRINT    | Position.GalacticLongitude.Reference
  PRINT    | Position.GalacticLongitude.Error.Upper
  PRINT    | Position.GalacticLongitude.Error.Lower
  PRINT    | Position.RightAscension
  PRINT    | Position.RightAscension.Reference
  PRINT    | Position.RightAscension.Error.Upper
  PRINT    | Position.RightAscension.Error.Lower
  PRINT    | Position.RightAscensionString
  PRINT    | =========================
  PRINT    | System keys:
  PRINT    | =========================
  PRINT    | System.Velocity
  PRINT    | System.Velocity.Reference
  PRINT    | System.Velocity.Error.Upper
  PRINT    | System.Velocity.Error.Lower
  PRINT    | System.Distance
  PRINT    | System.Distance.Reference
  PRINT    | System.Distance.Error.Upper
  PRINT    | System.Distance.Error.Lower
  PRINT    | System.NumberOfMoons
  PRINT    | System.Parallax
  PRINT    | System.Parallax.Reference
  PRINT    | System.Parallax.Error.Upper
  PRINT    | System.Parallax.Error.Lower
  PRINT    | System.TotalProperMotion
  PRINT    | System.TotalProperMotion.Reference
  PRINT    | System.ProperMotionDeclination
  PRINT    | System.ProperMotionDeclination.Reference
  PRINT    | System.ProperMotionDeclination.Error.Upper
  PRINT    | System.ProperMotionDeclination.Error.Lower
  PRINT    | System.TotalProperMotion.Error.Upper
  PRINT    | System.TotalProperMotion.Error.Lower
  PRINT    | System.ProperMotionRightAscension
  PRINT    | System.ProperMotionRightAscension.Reference
  PRINT    | System.ProperMotionRightAscension.Error.Upper
  PRINT    | System.ProperMotionRightAscension.Error.Lower
  PRINT    | System.NumberOfPlanets
  PRINT    | System.NumberOfStars
  PRINT    | =========================
  PRINT    | Stellar keys:
  PRINT    | =========================
  PRINT    | Star.Catalogue.GAIA
  PRINT    | Star.Catalogue.HD
  PRINT    | Star.Catalogue.HIP
  PRINT    | Star.Name
  PRINT    | Star.Age
  PRINT    | Star.Age.Reference
  PRINT    | Star.Age.Error.Upper
  PRINT    | Star.Age.Error.Lower
  PRINT    | Star.Density
  PRINT    | Star.Density.Reference
  PRINT    | Star.Density.Error.Upper
  PRINT    | Star.Density.Error.Lower
  PRINT    | Star.Logg
  PRINT    | Star.Logg.Reference
  PRINT    | Star.Logg.Error.Upper
  PRINT    | Star.Logg.Error.Lower
  PRINT    | Star.Luminosity
  PRINT    | Star.Luminosity.Reference
  PRINT    | Star.Luminosity.Error.Upper
  PRINT    | Star.Luminosity.Error.Lower
  PRINT    | Star.Mass
  PRINT    | Star.Mass.Reference
  PRINT    | Star.Mass.Error.Upper
  PRINT    | Star.Mass.Error.Lower
  PRINT    | Star.Metallicity
  PRINT    | Star.Metallicity.Reference
  PRINT    | Star.Metallicity.Error.Upper
  PRINT    | Star.Metallicity.Error.Lower
  PRINT    | Star.MetallicityRatio
  PRINT    | Star.Radius
  PRINT    | Star.Radius.Reference
  PRINT    | Star.Radius.Error.Upper
  PRINT    | Star.Radius.Error.Lower
  PRINT    | Star.RotationalPeriod
  PRINT    | Star.RotationalPeriod.Reference
  PRINT    | Star.RotationalPeriod.Error.Upper
  PRINT    | Star.RotationalPeriod.Error.Lower
  PRINT    | Star.Type.Reference
  PRINT    | Star.EffectiveTemperature
  PRINT    | Star.EffectiveTemperature.Reference
  PRINT    | Star.EffectiveTemperature.Error.Upper
  PRINT    | Star.EffectiveTemperature.Error.Lower
  PRINT    | Star.RotationalVelocity
  PRINT    | Star.RotationalVelocity.Reference
  PRINT    | Star.RotationalVelocity.Error.Upper
  PRINT    | Star.RotationalVelocity.Error.Lower
  PRINT    | Star.Catalogue.TIC
  PRINT    | =========================
  PRINT    | Planet keys:
  PRINT    | =========================
  PRINT    | Planet.AngularSeparation
  PRINT    | Planet.AngularSeparation.Reference
  PRINT    | Planet.AngularSeparation.Error.Upper
  PRINT    | Planet.AngularSeparation.Error.Lower
  PRINT    | Planet.BestMassEstimateEarth
  PRINT    | Planet.BestMassEstimateEarth.Reference
  PRINT    | Planet.BestMassEstimateEarth.Error.Upper
  PRINT    | Planet.BestMassEstimateEarth.Error.Lower
  PRINT    | Planet.BestMassEstimateJupiter
  PRINT    | Planet.BestMassEstimateJupiter.Reference
  PRINT    | Planet.BestMassEstimateJupiter.Error.Upper
  PRINT    | Planet.BestMassEstimateJupiter.Error.Lower
  PRINT    | Planet.Density
  PRINT    | Planet.Density.Reference
  PRINT    | Planet.Density.Error.Upper
  PRINT    | Planet.Density.Error.Lower
  PRINT    | Planet.EquilibriumTemperature
  PRINT    | Planet.EquilibriumTemperature.Reference
  PRINT    | Planet.EquilibriumTemperature.Error.Upper
  PRINT    | Planet.EquilibriumTemperature.Error.Lower
  PRINT    | Planet.ImpactParameter
  PRINT    | Planet.ImpactParameter.Reference
  PRINT    | Planet.ImpactParameter.Error.Upper
  PRINT    | Planet.ImpactParameter.Error.Lower
  PRINT    | Planet.InsolationFlux
  PRINT    | Planet.InsolationFlux.Reference
  PRINT    | Planet.InsolationFlux.Error.Upper
  PRINT    | Planet.InsolationFlux.Error.Lower
  PRINT    | Planet.Letter
  PRINT    | Planet.MassEarth
  PRINT    | Planet.MassEarth.Reference
  PRINT    | Planet.MassEarth.Error.Upper
  PRINT    | Planet.MassEarth.Error.Lower
  PRINT    | Planet.MassJupiter
  PRINT    | Planet.MassJupiter.Reference
  PRINT    | Planet.MassJupiter.Error.Upper
  PRINT    | Planet.MassJupiter.Error.Lower
  PRINT    | Planet.MinimumMassEarth
  PRINT    | Planet.MinimumMassEarth.Reference
  PRINT    | Planet.MinimumMassEarth.Error.Upper
  PRINT    | Planet.MinimumMassEarth.Error.Lower
  PRINT    | Planet.MinimumMassJupiter
  PRINT    | Planet.MinimumMassJupiter.Reference
  PRINT    | Planet.MinimumMassJupiter.Error.Upper
  PRINT    | Planet.MinimumMassJupiter.Error.Lower
  PRINT    | Planet.Name
  PRINT    | Planet.OccultationDepth
  PRINT    | Planet.OccultationDepth.Reference
  PRINT    | Planet.OccultationDepth.Error.Upper
  PRINT    | Planet.OccultationDepth.Error.Lower
  PRINT    | Planet.Eccentricity
  PRINT    | Planet.Eccentricity.Reference
  PRINT    | Planet.Eccentricity.Error.Upper
  PRINT    | Planet.Eccentricity.Error.Lower
  PRINT    | Planet.Inclination
  PRINT    | Planet.Inclination.Reference
  PRINT    | Planet.Inclination.Error.Upper
  PRINT    | Planet.Inclination.Error.Lower
  PRINT    | Planet.ArgumentOfPeriastron
  PRINT    | Planet.ArgumentOfPeriastron.Reference
  PRINT    | Planet.ArgumentOfPeriastron.Error.Upper
  PRINT    | Planet.ArgumentOfPeriastron.Error.Lower
  PRINT    | Planet.Period
  PRINT    | Planet.Period.Reference
  PRINT    | Planet.Period.Error.Upper
  PRINT    | Planet.Period.Error.Lower
  PRINT    | Planet.SemiMajorAxis
  PRINT    | Planet.SemiMajorAxis.Reference
  PRINT    | Planet.SemiMajorAxis.Error.Upper
  PRINT    | Planet.SemiMajorAxis.Error.Lower
  PRINT    | Planet.EpochOfPeriastron
  PRINT    | Planet.EpochOfPeriastron.Reference
  PRINT    | Planet.EpochOfPeriastron.Error.Upper
  PRINT    | Planet.EpochOfPeriastron.Error.Lower
  PRINT    | Planet.ProjectedObliquity
  PRINT    | Planet.ProjectedObliquity.Reference
  PRINT    | Planet.ProjectedObliquity.Error.Upper
  PRINT    | Planet.ProjectedObliquity.Error.Lower
  PRINT    | Planet.RadiusEarth
  PRINT    | Planet.RadiusEarth.Reference
  PRINT    | Planet.RadiusEarth.Error.Upper
  PRINT    | Planet.RadiusEarth.Error.Lower
  PRINT    | Planet.RadiusJupiter
  PRINT    | Planet.RadiusJupiter.Reference
  PRINT    | Planet.RadiusJupiter.Error.Upper
  PRINT    | Planet.RadiusJupiter.Error.Lower
  PRINT    | Planet.RatioSemiMajorAxisToStellarRadius
  PRINT    | Planet.RatioSemiMajorAxisToStellarRadius.Reference
  PRINT    | Planet.RatioSemiMajorAxisToStellarRadius.Error.Upper
  PRINT    | Planet.RatioSemiMajorAxisToStellarRadius.Error.Lower
  PRINT    | Planet.RatioPlanetRadiusToStellarRadius
  PRINT    | Planet.RatioPlanetRadiusToStellarRadius.Reference
  PRINT    | Planet.RatioPlanetRadiusToStellarRadius.Error.Upper
  PRINT    | Planet.RatioPlanetRadiusToStellarRadius.Error.Lower
  PRINT    | Planet.RadialVelocityAmplitude
  PRINT    | Planet.RadialVelocityAmplitude.Reference
  PRINT    | Planet.RadialVelocityAmplitude.Error.Upper
  PRINT    | Planet.RadialVelocityAmplitude.Error.Lower
  PRINT    | Planet.TransitDepth
  PRINT    | Planet.TransitDepth.Reference
  PRINT    | Planet.TransitDepth.Error.Upper
  PRINT    | Planet.TransitDepth.Error.Lower
  PRINT    | Planet.TransitDuration
  PRINT    | Planet.TransitDuration.Reference
  PRINT    | Planet.TransitDuration.Error.Upper
  PRINT    | Planet.TransitDuration.Error.Lower
  PRINT    | Planet.TransitMidpoint
  PRINT    | Planet.TransitMidpoint.Reference
  PRINT    | Planet.TransitMidpoint.Error.Upper
  PRINT    | Planet.TransitMidpoint.Error.Lower
  PRINT    | Planet.TrueObliquity
  PRINT    | Planet.TrueObliquity.Reference
  PRINT    | Planet.TrueObliquity.Error.Upper
  PRINT    | Planet.TrueObliquity.Error.Lower
  PRINT    | =========================
  PRINT    | Discovery keys:
  PRINT    | =========================
  PRINT    | Discovery.Facility
  PRINT    | Discovery.Instrument
  PRINT    | Discovery.Locale
  PRINT    | Discovery.PublicationDate
  PRINT    | Discovery.Reference
  PRINT    | Discovery.Telescope
  PRINT    | Discovery.Year
  PRINT    | Discovery.Method
  PRINT    | =========================
  PRINT    | Magnitude keys:
  PRINT    | =========================
  PRINT    | Magnitude.B
  PRINT    | Magnitude.B.Reference
  PRINT    | Magnitude.B.Error.Upper
  PRINT    | Magnitude.B.Error.Lower
  PRINT    | Magnitude.Gaia
  PRINT    | Magnitude.Gaia.Reference
  PRINT    | Magnitude.Gaia.Error.Upper
  PRINT    | Magnitude.Gaia.Error.Lower
  PRINT    | Magnitude.g
  PRINT    | Magnitude.g.Reference
  PRINT    | Magnitude.g.Error.Upper
  PRINT    | Magnitude.g.Error.Lower
  PRINT    | Magnitude.H
  PRINT    | Magnitude.H.Reference
  PRINT    | Magnitude.H.Error.Upper
  PRINT    | Magnitude.H.Error.Lower
  PRINT    | Magnitude.IC
  PRINT    | Magnitude.IC.Reference
  PRINT    | Magnitude.IC.Error.Upper
  PRINT    | Magnitude.IC.Error.Lower
  PRINT    | Magnitude.i
  PRINT    | Magnitude.i.Reference
  PRINT    | Magnitude.i.Error.Upper
  PRINT    | Magnitude.i.Error.Lower
  PRINT    | Magnitude.J
  PRINT    | Magnitude.J.Reference
  PRINT    | Magnitude.J.Error.Upper
  PRINT    | Magnitude.J.Error.Lower
  PRINT    | Magnitude.Kepler
  PRINT    | Magnitude.Kepler.Reference
  PRINT    | Magnitude.Kepler.Error.Upper
  PRINT    | Magnitude.Kepler.Error.Lower
  PRINT    | Magnitude.K
  PRINT    | Magnitude.K.Reference
  PRINT    | Magnitude.K.Error.Upper
  PRINT    | Magnitude.K.Error.Lower
  PRINT    | Magnitude.r
  PRINT    | Magnitude.r.Reference
  PRINT    | Magnitude.r.Error.Upper
  PRINT    | Magnitude.r.Error.Lower
  PRINT    | Magnitude.TESS
  PRINT    | Magnitude.TESS.Reference
  PRINT    | Magnitude.TESS.Error.Upper
  PRINT    | Magnitude.TESS.Error.Lower
  PRINT    | Magnitude.u
  PRINT    | Magnitude.u.Reference
  PRINT    | Magnitude.u.Error.Upper
  PRINT    | Magnitude.u.Error.Lower
  PRINT    | Magnitude.V
  PRINT    | Magnitude.V.Reference
  PRINT    | Magnitude.V.Error.Upper
  PRINT    | Magnitude.V.Error.Lower
  PRINT    | Magnitude.W1
  PRINT    | Magnitude.W1.Reference
  PRINT    | Magnitude.W1.Error.Upper
  PRINT    | Magnitude.W1.Error.Lower
  PRINT    | Magnitude.W2
  PRINT    | Magnitude.W2.Reference
  PRINT    | Magnitude.W2.Error.Upper
  PRINT    | Magnitude.W2.Error.Lower
  PRINT    | Magnitude.W3
  PRINT    | Magnitude.W3.Reference
  PRINT    | Magnitude.W3.Error.Upper
  PRINT    | Magnitude.W3.Error.Lower
  PRINT    | Magnitude.W4
  PRINT    | Magnitude.W4.Reference
  PRINT    | Magnitude.W4.Error.Upper
  PRINT    | Magnitude.W4.Error.Lower
  PRINT    | Magnitude.z
  PRINT    | Magnitude.z.Reference
  PRINT    | Magnitude.z.Error.Upper
  PRINT    | Magnitude.z.Error.Lower
  PRINT    | =========================
  PRINT    | Flag keys:
  PRINT    | =========================
  PRINT    | Flag.AstrometricVariations
  PRINT    | Flag.BinarySystem
  PRINT    | Flag.DiskKinematics
  PRINT    | Flag.EclipseTimingVariations
  PRINT    | Flag.Imaging
  PRINT    | Flag.Microlensing
  PRINT    | Flag.OrbitalBrightnessModulations
  PRINT    | Flag.PulsationTimingVariations
  PRINT    | Flag.PulsarTimingVariations
  PRINT    | Flag.RadialVelocity
  PRINT    | Flag.Transit

As you can see, there is particular system to the key names: First, there are 7 types of parameters:

  1. Position

  • Position of host star on the sky. Rarely used in filtering, but important for the transit window plot.

  1. System

  • Parameters related to the system, in particular the systemic velocity and the distance

  1. Star

  • Stellar parameters of the host star. If multiple stars are present in this system, the primary star is selected.

  1. Planet

  • Planetary parameters.

  1. Magnitude

  • Magnitude of the host star

  1. Flag

  • Several flags available in the table. Typically, these include whether the planets were detected by specific method, like transits. Several functions use this to filter down only transiting planets.

Second, most parameters have four keys.

  1. Parameter

  • The value of parameter

  1. Parameter.Error.Lower

  • The lower (-) error of the parameter

  1. Parameter.Error.Upper

  • The upper (+) error of the parameter

  1. Parameter.Reference

  • Reference for the given parameter

Filtering specific planet

To get a single planet, we can filter out the table attribute of the Catalog class. This is a standard pandas DataFrame type table. Lets get the sample for HD 209458 b.

Tip: Because the attribute for the filtering is pandas DataFrame, you can use any of the pandas function on it (intended for DataFrame). More info available in the Filtering notebook.

[4]:
Catalog.table = Catalog.table[Catalog.table['Planet.Name'] == 'HD 209458 b']

Plotting the sample:

There are several functions provided to plot the exoplanet population and (further) filtered target sample.

The idea behind the plotting functions is that multiple (over-)plots can be done on the same figure. To do so, the plt.Axes artist (typically ax), can be passed to all plot functions. By default, if ax is not passed, a new plot gets created instead.

As there are many aspects of the plot that can be changed, the resulting ax is always returned. This allows for further modification (like linear vs log scales of axis) outside the functions.

Let’s make a plot usable for proposal. For this case, we will focus on a plot targeting HD 209458 b.

[5]:
import seaborn as sns

with sns.plotting_context('talk'):
    fig, ax = Catalog.highlight_sample(
        x_key = 'Planet.Period',
        y_key = 'Planet.RadiusJupiter',
    )
    ax.set_xlim(0.1,50) # Set to max of 50 days.

_images/Get_started_13_0.png

Calculation of transit windows

Lets now calculate all transit windows. By default, we will get transits windows in the next year.

[6]:
from PTO.transits.windows import Windows
Transits = Windows(
    table = Catalog.table,
    directory= './HD209458b/',
)
  WARNING  | petitRADTRANS instalation not found. Please install petitRADTRANS to use the PTO.simulations module.
  INFO     | =========================
  INFO     | Set observing period:
  INFO     |     2024-11-19 12:00:00.000
  INFO     |     2025-11-19 12:00:00.000
  INFO     | =========================
  INFO     | About to calculate event midpoints for 1 planets

This doesn’t seem to do much at a glance. However, it calculates all transit events for all planets for further use. We can check the possible windows by printing all the windows.

[7]:
Transits.print_windows()
  PRINT    | =========================
  PRINT    | Transit windows centers for HD 209458 b
  PRINT    |     2460637.47207873 ± 1.39 min | 2024-11-22 23:19 UT
  PRINT    |     2460640.9968273197 ± 1.39 min | 2024-11-26 11:55 UT
  PRINT    |     2460644.52157591 ± 1.40 min | 2024-11-30 00:31 UT
  PRINT    |     2460648.0463245 ± 1.40 min | 2024-12-03 13:06 UT
  PRINT    |     2460651.5710730897 ± 1.40 min | 2024-12-07 01:42 UT
  PRINT    |     2460655.09582168 ± 1.40 min | 2024-12-10 14:17 UT
  PRINT    |     2460658.62057027 ± 1.40 min | 2024-12-14 02:53 UT
  PRINT    |     2460662.1453188597 ± 1.40 min | 2024-12-17 15:29 UT
  PRINT    |     2460665.67006745 ± 1.40 min | 2024-12-21 04:04 UT
  PRINT    |     2460669.19481604 ± 1.40 min | 2024-12-24 16:40 UT
  PRINT    |     2460672.7195646297 ± 1.40 min | 2024-12-28 05:16 UT
  PRINT    |     2460676.24431322 ± 1.40 min | 2024-12-31 17:51 UT
  PRINT    |     2460679.76906181 ± 1.40 min | 2025-01-04 06:27 UT
  PRINT    |     2460683.2938103997 ± 1.40 min | 2025-01-07 19:03 UT
  PRINT    |     2460686.81855899 ± 1.40 min | 2025-01-11 07:38 UT
  PRINT    |     2460690.34330758 ± 1.40 min | 2025-01-14 20:14 UT
  PRINT    |     2460693.8680561697 ± 1.40 min | 2025-01-18 08:50 UT
  PRINT    |     2460697.39280476 ± 1.40 min | 2025-01-21 21:25 UT
  PRINT    |     2460700.91755335 ± 1.40 min | 2025-01-25 10:01 UT
  PRINT    |     2460704.4423019397 ± 1.40 min | 2025-01-28 22:36 UT
  PRINT    |     2460707.96705053 ± 1.40 min | 2025-02-01 11:12 UT
  PRINT    |     2460711.49179912 ± 1.41 min | 2025-02-04 23:48 UT
  PRINT    |     2460715.0165477097 ± 1.41 min | 2025-02-08 12:23 UT
  PRINT    |     2460718.5412963 ± 1.41 min | 2025-02-12 00:59 UT
  PRINT    |     2460722.06604489 ± 1.41 min | 2025-02-15 13:35 UT
  PRINT    |     2460725.5907934797 ± 1.41 min | 2025-02-19 02:10 UT
  PRINT    |     2460729.11554207 ± 1.41 min | 2025-02-22 14:46 UT
  PRINT    |     2460732.64029066 ± 1.41 min | 2025-02-26 03:22 UT
  PRINT    |     2460736.1650392497 ± 1.41 min | 2025-03-01 15:57 UT
  PRINT    |     2460739.68978784 ± 1.41 min | 2025-03-05 04:33 UT
  PRINT    |     2460743.21453643 ± 1.41 min | 2025-03-08 17:08 UT
  PRINT    |     2460746.7392850197 ± 1.41 min | 2025-03-12 05:44 UT
  PRINT    |     2460750.26403361 ± 1.41 min | 2025-03-15 18:20 UT
  PRINT    |     2460753.7887822 ± 1.41 min | 2025-03-19 06:55 UT
  PRINT    |     2460757.3135307897 ± 1.41 min | 2025-03-22 19:31 UT
  PRINT    |     2460760.83827938 ± 1.41 min | 2025-03-26 08:07 UT
  PRINT    |     2460764.36302797 ± 1.41 min | 2025-03-29 20:42 UT
  PRINT    |     2460767.8877765597 ± 1.41 min | 2025-04-02 09:18 UT
  PRINT    |     2460771.41252515 ± 1.41 min | 2025-04-05 21:54 UT
  PRINT    |     2460774.93727374 ± 1.42 min | 2025-04-09 10:29 UT
  PRINT    |     2460778.4620223297 ± 1.42 min | 2025-04-12 23:05 UT
  PRINT    |     2460781.98677092 ± 1.42 min | 2025-04-16 11:40 UT
  PRINT    |     2460785.51151951 ± 1.42 min | 2025-04-20 00:16 UT
  PRINT    |     2460789.0362680997 ± 1.42 min | 2025-04-23 12:52 UT
  PRINT    |     2460792.56101669 ± 1.42 min | 2025-04-27 01:27 UT
  PRINT    |     2460796.08576528 ± 1.42 min | 2025-04-30 14:03 UT
  PRINT    |     2460799.6105138697 ± 1.42 min | 2025-05-04 02:39 UT
  PRINT    |     2460803.13526246 ± 1.42 min | 2025-05-07 15:14 UT
  PRINT    |     2460806.66001105 ± 1.42 min | 2025-05-11 03:50 UT
  PRINT    |     2460810.1847596397 ± 1.42 min | 2025-05-14 16:26 UT
  PRINT    |     2460813.70950823 ± 1.42 min | 2025-05-18 05:01 UT
  PRINT    |     2460817.23425682 ± 1.42 min | 2025-05-21 17:37 UT
  PRINT    |     2460820.7590054097 ± 1.42 min | 2025-05-25 06:12 UT
  PRINT    |     2460824.283754 ± 1.42 min | 2025-05-28 18:48 UT
  PRINT    |     2460827.80850259 ± 1.42 min | 2025-06-01 07:24 UT
  PRINT    |     2460831.3332511797 ± 1.42 min | 2025-06-04 19:59 UT
  PRINT    |     2460834.85799977 ± 1.42 min | 2025-06-08 08:35 UT
  PRINT    |     2460838.38274836 ± 1.43 min | 2025-06-11 21:11 UT
  PRINT    |     2460841.9074969497 ± 1.43 min | 2025-06-15 09:46 UT
  PRINT    |     2460845.43224554 ± 1.43 min | 2025-06-18 22:22 UT
  PRINT    |     2460848.95699413 ± 1.43 min | 2025-06-22 10:58 UT
  PRINT    |     2460852.4817427197 ± 1.43 min | 2025-06-25 23:33 UT
  PRINT    |     2460856.00649131 ± 1.43 min | 2025-06-29 12:09 UT
  PRINT    |     2460859.5312399 ± 1.43 min | 2025-07-03 00:44 UT
  PRINT    |     2460863.0559884897 ± 1.43 min | 2025-07-06 13:20 UT
  PRINT    |     2460866.58073708 ± 1.43 min | 2025-07-10 01:56 UT
  PRINT    |     2460870.10548567 ± 1.43 min | 2025-07-13 14:31 UT
  PRINT    |     2460873.6302342596 ± 1.43 min | 2025-07-17 03:07 UT
  PRINT    |     2460877.15498285 ± 1.43 min | 2025-07-20 15:43 UT
  PRINT    |     2460880.67973144 ± 1.43 min | 2025-07-24 04:18 UT
  PRINT    |     2460884.2044800296 ± 1.43 min | 2025-07-27 16:54 UT
  PRINT    |     2460887.72922862 ± 1.43 min | 2025-07-31 05:30 UT
  PRINT    |     2460891.25397721 ± 1.43 min | 2025-08-03 18:05 UT
  PRINT    |     2460894.7787257996 ± 1.43 min | 2025-08-07 06:41 UT
  PRINT    |     2460898.30347439 ± 1.43 min | 2025-08-10 19:17 UT
  PRINT    |     2460901.82822298 ± 1.44 min | 2025-08-14 07:52 UT
  PRINT    |     2460905.3529715696 ± 1.44 min | 2025-08-17 20:28 UT
  PRINT    |     2460908.87772016 ± 1.44 min | 2025-08-21 09:03 UT
  PRINT    |     2460912.40246875 ± 1.44 min | 2025-08-24 21:39 UT
  PRINT    |     2460915.9272173396 ± 1.44 min | 2025-08-28 10:15 UT
  PRINT    |     2460919.45196593 ± 1.44 min | 2025-08-31 22:50 UT
  PRINT    |     2460922.97671452 ± 1.44 min | 2025-09-04 11:26 UT
  PRINT    |     2460926.5014631096 ± 1.44 min | 2025-09-08 00:02 UT
  PRINT    |     2460930.0262117 ± 1.44 min | 2025-09-11 12:37 UT
  PRINT    |     2460933.55096029 ± 1.44 min | 2025-09-15 01:13 UT
  PRINT    |     2460937.07570888 ± 1.44 min | 2025-09-18 13:49 UT
  PRINT    |     2460940.60045747 ± 1.44 min | 2025-09-22 02:24 UT
  PRINT    |     2460944.12520606 ± 1.44 min | 2025-09-25 15:00 UT
  PRINT    |     2460947.64995465 ± 1.44 min | 2025-09-29 03:35 UT
  PRINT    |     2460951.17470324 ± 1.44 min | 2025-10-02 16:11 UT
  PRINT    |     2460954.69945183 ± 1.44 min | 2025-10-06 04:47 UT
  PRINT    |     2460958.22420042 ± 1.44 min | 2025-10-09 17:22 UT
  PRINT    |     2460961.74894901 ± 1.44 min | 2025-10-13 05:58 UT
  PRINT    |     2460965.2736976 ± 1.44 min | 2025-10-16 18:34 UT
  PRINT    |     2460968.79844619 ± 1.45 min | 2025-10-20 07:09 UT
  PRINT    |     2460972.32319478 ± 1.45 min | 2025-10-23 19:45 UT
  PRINT    |     2460975.8479433698 ± 1.45 min | 2025-10-27 08:21 UT
  PRINT    |     2460979.37269196 ± 1.45 min | 2025-10-30 20:56 UT
  PRINT    |     2460982.89744055 ± 1.45 min | 2025-11-03 09:32 UT
  PRINT    |     2460986.4221891398 ± 1.45 min | 2025-11-06 22:07 UT
  PRINT    |     2460989.94693773 ± 1.45 min | 2025-11-10 10:43 UT
  PRINT    |     2460993.47168632 ± 1.45 min | 2025-11-13 23:19 UT
  PRINT    |     2460996.9964349098 ± 1.45 min | 2025-11-17 11:54 UT

That looks like a lot of windows! Given the short period of HD 209458 b (3.5 days), we expect about 100 events in a year time!

However…

Plotting the transit window

Lets now plot the observability of transit windows for Paranal.

[8]:
import PTO.telescopes.telescopes as tel
Transits.generate_observability(
    location= tel.VLT,
)
  PRINT    | =========================
  PRINT    | Working on HD 209458 b
  PRINT    |     with Tc: 2451659.93742, P: 3.52474859 days and T14: 3.072 hours
  PRINT    | =========================
  INFO     |         Transit on: 20250730 - Quality: 1; Uncertainty: 1.43 min
  INFO     |         Transit on: 20250928 - Quality: 3; Uncertainty: 1.44 min

You can see the logger is automatically printing the main info about the planet and ephemeris. It also include the precision on the transit center - beware that sometimes the transit can be uncertain enough that the plot is meaningless.

Well, why do we have only 2 windows, when we had 100 opportunities? Turns out for Paranal (VLT location), HD 209458 b is not that great target. It is fairly north, with declination of +19 deg. VLT is on the other hand around -20 deg. This means the host star is always quite low on the horizon, even during the best time.

PTO automatically filters out windows where:

  1. Star is not visible.

  2. Full transit cannot be observed (there is partial keyword to allow partial transits, but by default it is disabled).

  3. No baseline can be observed.

The observability is defined by:

  1. Within the full night (defined by Sun altitude)

  2. Within the airmass limit (2.2, for ESPRESSO)

Both calculated windows look like this:

Q3_20250731_HD209458b Q8_20250929_HD209458b

Tip: By default, a working directory is used to save the transit window plots. You can adjust this by setting the directory attribute in Windows class.