Comparing Spots in PHOEBE 2 vs PHOEBE Legacy

Setup

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()

Adding Spots and Compute Options


In [3]:
b.add_spot(component='primary', relteff=0.8, radius=20, colat=45, colon=90, feature='spot01')


Out[3]:
<ParameterSet: 5 parameters | qualifiers: colat, radius, colon, long, relteff>

In [4]:
b.add_dataset('lc', times=np.linspace(0,1,101))


Out[4]:
<ParameterSet: 15 parameters | contexts: compute, dataset>

In [5]:
b.add_compute('phoebe', irrad_method='none', compute='phoebe2')


Out[5]:
<ParameterSet: 22 parameters | components: primary, secondary>

In [6]:
b.add_compute('legacy', refl_num=0, compute='phoebe1')


Out[6]:
<ParameterSet: 9 parameters | components: primary, secondary>

Let's use the external atmospheres available for both phoebe1 and phoebe2


In [7]:
b.set_value_all('atm', 'extern_planckint')


Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'

In [8]:
b.set_value_all('ld_func', 'logarithmic')
b.set_value_all('ld_coeffs', [0.0, 0.0])


Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'
Tue, 11 Jul 2017 14:02 PARAMETERS   WARNING ld_func='interp' only supported by atm='ck2004'

In [9]:
b.run_compute('phoebe2', model='phoebe2model')


Out[9]:
<ParameterSet: 2 parameters | qualifiers: fluxes, times>

In [10]:
b.run_compute('phoebe1', model='phoebe1model')


Tue, 11 Jul 2017 14:02 IO           WARNING rpole has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING freq has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING irrad_frac_lost_bol has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING ld_func_bol has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING mass has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING rpole has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING freq has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING irrad_frac_lost_bol has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING ld_func_bol has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING mass has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING fti_method has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING lc_method has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING fti_method has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING lc_method has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING Finite integration Time is not fully supported and will be turned off by legacy wrapper before computation
Tue, 11 Jul 2017 14:02 IO           WARNING pblum_ref has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING intens_weighting has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING pblum_ref has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING freq has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING t0_perpass has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING mean_anom has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING long_an has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING asini has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING ecosw has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING esinw has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING protomesh has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING pbmesh has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING t0 has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING ra has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING dec has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING epoch has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING distance has no phoebe 1 corollary
Tue, 11 Jul 2017 14:02 IO           WARNING hierarchy has no phoebe 1 corollary
Out[10]:
<ParameterSet: 2 parameters | qualifiers: fluxes, times>

Plotting


In [14]:
axs, artists = b.plot()
legend = plt.legend()
ylims = plt.ylim(1.94, 2.02)



In [ ]: