Limb Darkening

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


WARNING: Constant u'Gravitational constant' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar mass' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar radius' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar luminosity' is already has a definition in the u'si' system [astropy.constants.constant]
/usr/local/lib/python2.7/dist-packages/astropy/units/quantity.py:782: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return super(Quantity, self).__eq__(other)

We'll just add 'lc' and 'mesh' datasets


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


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

In [4]:
b.add_dataset('mesh', times=[0.75], dataset='mesh01')


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

Relevant Parameters


In [5]:
print b['ld_func_bol@primary']


Parameter: ld_func_bol@primary@component
                       Qualifier: ld_func_bol
                     Description: Bolometric limb darkening model
                           Value: logarithmic
                         Choices: linear, logarithmic, quadratic, square_root, power


In [6]:
print b['ld_func_bol@primary'].choices


['linear', 'logarithmic', 'quadratic', 'square_root', 'power']

In [7]:
print b['ld_coeffs_bol@primary']


Parameter: ld_coeffs_bol@primary@component
                       Qualifier: ld_coeffs_bol
                     Description: Bolometric limb darkening coefficients
                           Value: [ 0.5  0.5]
                  Constrained by: 
                      Constrains: None
                      Related to: None


In [8]:
print b['ld_func@lc01']


ParameterSet: 2 parameters
    ld_func@primary@lc01@dataset: interp
  ld_func@secondary@lc01@dataset: interp

In [9]:
print b['ld_func@lc01@primary'].choices


['interp', 'linear', 'logarithmic', 'quadratic', 'square_root', 'power']

Note that ld_coeffs isn't visible (relevant) if ld_func=='interp'


In [10]:
b['ld_func@lc01@primary'] = 'logarithmic'

In [11]:
print b['ld_coeffs@lc01@primary']


Parameter: ld_coeffs@primary@lc01@dataset
                       Qualifier: ld_coeffs
                     Description: Limb darkening coefficients
                           Value: [ 0.5  0.5]
                  Constrained by: 
                      Constrains: None
                      Related to: None
                 Only visible if: ld_func:!interp

Influence on Light Curves (fluxes)


In [12]:
b.run_compute(model='mymodel')


Out[12]:
<ParameterSet: 76 parameters | kinds: mesh, lc>

In [13]:
axs, artists = b['lc01@mymodel'].plot()


Influence on Meshes (Intensities)

COMING SOON

TODO: vary over different ld_func or ld_coeffs and show how they affect values and plots


In [ ]: