Light curve fit#

We will start this example by considering the TESS light curve of HD189733, also known as TOI 4470.

For the purposes of this example, the light curve has been already flattened using wōtan Hippke et al. 2019, although one could perform light curve flattening within PyORBIT as well.

Dataset#

Light curve datasets differ from radial velocity or activity datasets for a fundamental aspect: the effect of planets or stellar activity is a multiplicative effect, rather than additive. For example, a Jupiter-like transiting a Sun-like star will cause a drop in light of about 1% regardless of the absolute value of the flux recorded on the ground. Thus, removing an additive offset from the light curve would inevitably affect the observed transit depth. For this reason, a light curve dataset must always have the offset flag deactivated:

#epoch value error jitter_flag offset_flag
  2459422.028697         0.999750         0.000205 0 -1
  2459422.030086         1.000049         0.000205 0 -1
  2459422.031475         1.000001         0.000205 0 -1
...

This is equivalent in writing:

#epoch value error jitter_flag
  2459422.028697         0.999750         0.000205 0
  2459422.030086         1.000049         0.000205 0
  2459422.031475         1.000001         0.000205 0
...

Keep in mind that 0 activates a flag, -1 deactivates it, following the Python notation, while the absence of a column automatically deactivates a flag.

Configuration file#

In this example, the full configuration file to fit a TESS lightcurve is reported

 1inputs:
 2  LCdata_TESS:
 3    file: ./HD189733_TESS_PyORBIT.dat
 4    kind: Phot
 5    models:
 6      - lc_model
 7common:
 8  planets:
 9    b:
10      orbit: circular
11      use_time_inferior_conjunction: True
12      boundaries:
13        P: [2.2185600, 2.2185800]
14        Tc: [2459770.4100, 2459770.4110]
15      spaces:
16        P: Linear
17  star:
18    star_parameters:
19      priors:
20        mass: ['Gaussian', 0.806, 0.048]
21        radius: ['Gaussian', 0.756, 0.018]
22        density: ['Gaussian', 1.864, 0.175] #in Solar unit!!!!!!!
23    limb_darkening:
24      model: ld_quadratic
25      parametrization: Kipping
26models:
27  lc_model:
28    model: batman_transit
29    limb_darkening: limb_darkening
30    planets:
31      - b
32parameters:
33  Tref: 2459750.00
34solver:
35  pyde:
36    ngen: 50000
37    npop_mult: 4
38  emcee:
39    npop_mult: 4
40    nsteps: 100000
41    nburn: 20000
42    nsave: 10000
43    thin: 100
44  nested_sampling:
45    nlive: 1000
46  recenter_bounds: True

There is a lot to process:

Fit of the time of inferior conjuction \(T_c\) (equivalent to the central time of transit in the case of a circular orbit) is the way to go, as we now we have a good guess of the orbital period and time of transit. Although the \(P\) and \(T_C\) boundaries are quite tight, they can still be considered uninformative priors as the final posteriors will have much narrow distributions. To enable the use of \(T_C\) instead of the mean longitude mean_long, you need to activate the flag use_time_inferior_conjunction.

 7common:
 8    planets:
 9        b:
10            orbit: circular
11            use_time_inferior_conjunction: True
12            boundaries:
13                P: [0.50, 5.0]
14                K: [0.01, 300.0]
15                e: [0.00, 0.95]

Stellar density is expressed in Solar units, so a star with one Solar mass and one Solar radius will have a density equal to one. If you know mass anda radius of a star in Solar units, then the density will be simply \(\rho_\star = M_\star / R_\star^3\), without multiplicative constants.

Limb darkening coefficients are included under the star common model for conceptual reasons, although you must remeber that lightcurves obtained with different filters will require specific limb darkening paramters. When using a quadratic limb darkening law, you can use the parametrization introduced by Kipping cby simply activating the flag as in the example

Light curve modellling can be performed either with batman (Kreidberg 2015) or PyTransit (Pairviainen 2015). You can choose the model by specifying batman_transit or pytransit_transit respectively.

Linear space for Period will avoid the logarithmic transformation of this parameter, which is not required given the small range of the period.

Multiband photometry#

Multiband photometry with specific limb darkening parameters is easy to accomodate. In this example, we will add four lightcurves in Ic(Cousins) band from Bakos et al. 2006 to the TESS photometry

 1inputs:
 2  LCdata_TESS:
 3    file: HD189733_TESS_PyORBIT.dat
 4    kind: Phot
 5    models:
 6      - lc_model_TESS
 7  LCdata_Bakos2006_LC06:
 8    file: Bakos2006_LC06_PyORBIT.dat
 9    kind: Phot
10    models:
11      - lc_model_Ic_Cousins
12  LCdata_Bakos2006_LC07:
13    file: Bakos2006_LC07_PyORBIT.dat
14    kind: Phot
15    models:
16      - lc_model_Ic_Cousins
17  LCdata_Bakos2006_LC08:
18    file: /Bakos2006_LC08_PyORBIT.dat
19    kind: Phot
20    models:
21      - lc_model_Ic_Cousins
22  LCdata_Bakos2006_LC09:
23    file: Bakos2006_LC09_PyORBIT.dat
24    kind: Phot
25    models:
26      - lc_model_Ic_Cousins
27common:
28  planets:
29    b:
30      orbit: circular
31      parametrization: Eastman2013_Tcent
32      boundaries:
33        P: [2.2185600, 2.2185800]
34        Tc: [2459770.4100, 2459770.4110]
35      spaces:
36        P: Linear
37  star:
38    star_parameters:
39      priors:
40        mass: ['Gaussian', 0.806, 0.048]
41        radius: ['Gaussian', 0.756, 0.018]
42        density: ['Gaussian', 1.864, 0.175] #in Solar unit!!!!!!!
43    limb_darkening_TESS:
44      model: ld_quadratic
45      parametrization: Kipping
46    limb_darkening_Ic_Cousins:
47      type: ld_quadratic
48      #parametrization: Kipping
49      priors:
50        ld_c1: ['Gaussian', 0.45, 0.05]
51        ld_c2: ['Gaussian', 0.13, 0.05]
52models:
53  lc_model_TESS:
54    model: batman_transit
55    limb_darkening: limb_darkening_TESS
56    planets:
57      - b
58  lc_model_Ic_Cousins:
59    kind: batman_transit
60    limb_darkening: limb_darkening_Ic_Cousins
61    planets:
62      - b
63parameters:
64  Tref: 2459750.00
65solver:
66  pyde:
67    ngen: 50000
68    npop_mult: 4
69  emcee:
70    npop_mult: 4
71    nsteps: 100000
72    nburn: 20000
73    nsave: 10000
74    thin: 100
75  nested_sampling:
76    nlive: 1000
77  recenter_bounds: True

Note the main differences:

  • There are now two limb darkening models under the star common model. I decided to rename the TESS limb darkening model to clearly distinguish from the Ic (Cousins) one, but the renaming is not strictly necessary.

  • I have specified a set of prior for the limb darkening coefficient of the Ic (Cousins) filter. In doing so, there is no advantage in using the Kipping parametrization and it can be omitted

  • There are now two light curve models under the models section, one for each set of limb darkening paramters. The number of models does not depend of the number of datasets, but on the number of photometric bands, as they influence the shape of a transit.

  • In the input section, the correct model must be associated to each dataset.

Attention

In this example we assumed that the transit depth is independent from wavelength.

It is indeed possible to obtain independent radius estimates for different photometric bands by using some of the advanced features of PyORBIT. An example will be provided in a dedicated tutorial.

Warning

batman may get stuck in a loop when eccentricity is higher than 0.95.