Limb Darkening

Setup

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

We'll just add an 'lc' dataset


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


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

Relevant Parameters


In [4]:
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 [5]:
print b['ld_func_bol@primary'].choices


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

In [6]:
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 [7]:
print b['ld_func@lc01']


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

In [8]:
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 [9]:
b['ld_func@lc01@primary'] = 'logarithmic'

In [10]:
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 [11]:
b.run_compute(model='mymodel')


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

In [12]:
afig, mplfig = b['lc01@mymodel'].plot(show=True)