Let's first make sure we have the latest version of PHOEBE 2.1 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release).
In [ ]:
!pip install -I "phoebe>=2.1,<2.2"
As always, let's do imports and initialize a logger and a new Bundle. See Building a System for more details.
In [1]:
%matplotlib inline
In [2]:
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
In [3]:
ps, constraints = phoebe.dataset.etv(component='mycomponent')
print ps
Currently, none of the available etv methods actually compute fluxes. But if one is added that computes a light-curve and actually finds the time of mid-eclipse, then the passband-dependend parameters will be added here.
For information on these passband-dependent parameters, see the section on the lc dataset
In [4]:
print ps['Ns']
In [5]:
print ps['time_ephems']
In [6]:
print ps['time_ecls']
In [7]:
print ps['etvs']
In [8]:
print ps['sigmas']
Let's look at the compute options (for the default PHOEBE 2 backend) that relate to the ETV dataset.
Other compute options are covered elsewhere:
In [10]:
ps_compute = phoebe.compute.phoebe()
print ps_compute
In [11]:
print ps_compute['etv_method']
In [12]:
print ps_compute['etv_tol']
In [13]:
b.add_dataset('etv', Ns=np.linspace(0,10,11), dataset='etv01')
Out[13]:
In [14]:
b.add_compute()
Out[14]:
In [15]:
b.run_compute()
Out[15]:
In [16]:
b['etv@model'].twigs
Out[16]:
In [17]:
print b['time_ephems@primary@etv@model']
In [18]:
print b['time_ecls@primary@etv@model']
In [19]:
print b['etvs@primary@etv@model']
In [20]:
axs, artists = b['etv@model'].plot()
Alternatively, especially when overplotting with a light curve, its sometimes handy to just plot ticks at each of the eclipse times. This can easily be done by passing a single value for 'y'.
For other examples with light curves as well see:
In [21]:
axs, artists = b['etv@model'].plot(x='time_ecls', y=2)
In [ ]: