Let's first make sure we have the latest version of PHOEBE 2.0 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.0,<2.1"
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]:
b.add_spot(component='primary', relteff=0.8, radius=20, colat=45, colon=90, feature='spot01')
Out[3]:
In [4]:
b.add_dataset('lc', times=np.linspace(0,1,101))
Out[4]:
In [5]:
b.add_compute('phoebe', irrad_method='none', compute='phoebe2')
Out[5]:
In [6]:
b.add_compute('legacy', refl_num=0, compute='phoebe1')
Out[6]:
Let's use the external atmospheres available for both phoebe1 and phoebe2
In [7]:
b.set_value_all('atm', 'extern_planckint')
In [8]:
b.set_value_all('ld_func', 'logarithmic')
b.set_value_all('ld_coeffs', [0.0, 0.0])
In [9]:
b.run_compute('phoebe2', model='phoebe2model')
Out[9]:
In [10]:
b.run_compute('phoebe1', model='phoebe1model')
Out[10]:
In [14]:
axs, artists = b.plot()
legend = plt.legend()
ylims = plt.ylim(1.94, 2.02)
In [ ]: