PHOEBE 2.0 Documentation

2.0 Docs

  • 1.0
  • 2.0a
  • ver: 2.0


Prev: Systemic Velocity Next: “Third” Light
.

IPython Notebook | Python Script

Passband Luminosity

Setup

As always, let’s do imports and initialize a logger and a new bundle. See Building a System for more details.

%matplotlib inline
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)

And we’ll add a single light curve dataset so that we can see how passband luminosities affect the resulting synthetic light curve model.

b.add_dataset('lc', times=np.linspace(0,1,101), dataset='lc01')
<ParameterSet: 15 parameters | contexts: compute, dataset>

Lastly, just to make things a bit easier, we’ll turn off limb-darkening and irradiation (reflection).

b.set_value_all('ld_func', 'logarithmic')
b.set_value_all('ld_coeffs', [0,0])
b.set_value('irrad_method', 'none')

Relevant Parameters

The ‘pblum_ref’ parameter exists for each component-dataset pair and it determines how the intensities for that star in that passband should be scaled, i.e. by the pblum provided by that component (‘self’) or coupled to the pblum provided by another component.

By default the passband luminosities are coupled (see below for explanations of coupled vs decoupled), with the passband luminosity being defined by the primary component in the system.

print b['pblum_ref']
ParameterSet: 2 parameters
  pblum_ref@primary@lc01@dataset: self
  pblum_ref@secondary@lc01@da...: primary
print b['pblum_ref@primary']
Parameter: pblum_ref@primary@lc01@dataset
                       Qualifier: pblum_ref
                     Description: Whether to use this components pblum or to couple to that from another component in the system
                           Value: self
                         Choices: self, primary, secondary

The ‘pblum’ parameter is only relevant for each component-dataset pair in which pbscale==pblum. This component will then have its intensities scaled such that they match the value provided by pblum. In general, a pblum of 4pi will result in an out-of-eclipse flux of ~1.

print b['pblum']
Parameter: pblum@primary@lc01@dataset
                       Qualifier: pblum
                     Description: Passband luminosity (defined at t0)
                           Value: 12.5663706144 W
                  Constrained by:
                      Constrains: None
                      Related to: None
                 Only visible if: pblum_ref:self

NOTE: other parameters also affect flux-levels, including limb darkening and distance

Coupled Luminosities

Passband luminosities are considered coupled when a single pblum value is provided, while the passband luminosity of the other component(s) is scaled by the same factor. To accomplish this, ONE pblum_ref in the system must be set as ‘self’ and ALL OTHER pbscales must refer to that component. This is the default case, set explicitly by:

b['pblum_ref@primary'] = 'self'
b['pblum_ref@secondary'] = 'primary'

Now note that only a single pblum parameter is visible.

print b['pblum']
Parameter: pblum@primary@lc01@dataset
                       Qualifier: pblum
                     Description: Passband luminosity (defined at t0)
                           Value: 12.5663706144 W
                  Constrained by:
                      Constrains: None
                      Related to: None
                 Only visible if: pblum_ref:self

Let’s see how changing the value of pblum affects the computed light curve. By default, pblum is set to be 4 pi, giving a total flux for the primary star of ~1.

Since the secondary star in the default binary is identical to the primary star, we’d expect an out-of-eclipse flux of the binary to be ~2.

b.run_compute()
<ParameterSet: 2 parameters | qualifiers: fluxes, times>
axs, artists = b.plot(dataset='lc01')
../../_images/pblum_23_0.png

If we now set pblum to be only 2 pi, we should expect the entire light curve to be scaled in half.

b['pblum@primary'] = 2 * np.pi
b.run_compute()
Fri, 10 Feb 2017 16:21 BUNDLE       WARNING overwriting model: latest
<ParameterSet: 2 parameters | qualifiers: fluxes, times>
axs, artist = b.plot()
../../_images/pblum_27_0.png

And if we introduce a significant temperature ratio - the resulting light curve changes to the new sum of fluxes, where the primary star dominates since the secondary star flux is reduced by a factor of 16, so we expect a total out-of-eclipse flux of ~0.5 + ~0.5/16 = ~0.53.

print b['teff']
ParameterSet: 2 parameters
          teff@primary@component: 6000.0 K
        teff@secondary@component: 6000.0 K
b['teff@secondary'] = 5000.
b.run_compute()
Fri, 10 Feb 2017 16:22 BUNDLE       WARNING overwriting model: latest
<ParameterSet: 2 parameters | qualifiers: fluxes, times>
axs, artists = b.plot()
../../_images/pblum_32_0.png

Let us undo our changes before we look at decoupled luminosities.

b.set_value_all('teff', 10000)
b.set_value_all('pblum', 4*np.pi)
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32

Decoupled Luminosities

The luminosities are decoupled when pblums are provided for the individual components. To accomplish this, all ‘pblum_ref’ parameters should be set to ‘self’.

b.set_value_all('pblum_ref', 'self')
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:23 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32

Now we see that both pblums are available and can have different values.

print b['pblum']
ParameterSet: 2 parameters
      pblum@primary@lc01@dataset: 12.5663706144 W
    pblum@secondary@lc01@dataset: 12.5663706144 W

If we set these to 4pi, then we’d expect each star to contribute 1.0 in flux units, meaning the baseline of the light curve should be at approximately 2.0

b.set_value_all('pblum', 4*np.pi)
Fri, 10 Feb 2017 16:24 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:24 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:24 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
b.run_compute()
Fri, 10 Feb 2017 16:24 BUNDLE       WARNING overwriting model: latest
Fri, 10 Feb 2017 16:24 BUNDLE       WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
<ParameterSet: 2 parameters | qualifiers: fluxes, times>
axs, artists = b.plot()
../../_images/pblum_42_0.png

Now let’s make a significant temperature-ratio by making a very cool secondary star. Since the luminosities are decoupled - this temperature change won’t affect the resulting light curve very much (compare this to the case above with coupled luminosities). What is happening here is that even though the secondary star is cooler, its luminosity is being rescaled to the same value as the primary star, so the eclipse depth doesn’t change (you would see a similar lack-of-effect if you changed the radii).

print b['teff']
ParameterSet: 2 parameters
          teff@primary@component: 10000.0 K
        teff@secondary@component: 10000.0 K
b['teff@secondary'] = 5000
Fri, 10 Feb 2017 16:24 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
b.run_compute()
Fri, 10 Feb 2017 16:24 BUNDLE       WARNING overwriting model: latest
Fri, 10 Feb 2017 16:24 BUNDLE       WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
<ParameterSet: 2 parameters | qualifiers: fluxes, times>
axs, artists = b.plot()
../../_images/pblum_47_0.png

In most cases you will not want decoupled luminosities as they can easily break the self-consistency of your model.

Now we’ll just undo our changes before we look at accessing model luminosities.

b.set_value_all('teff', 10000)
b.set_value_all('pblum', 4*np.pi)
b['pblum_ref@primary'] = 'self'
b['pblum_ref@secondary'] = 'primary'
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32

Accessing Model Luminosities

Luminosities of the individual stars in a system can be accessed through the mesh (either through creating a mesh dataset or by setting pbmesh=True during run_compute). For stars that have pblum defined (as opposed to coupled to another star in the system), this value should be equivalent to pblum at t0 - and in simple circular cases will probably be equivalent at all times.

Let’s create a mesh dataset at a few times and then access the synthetic luminosities.

b.add_dataset('mesh', times=np.linspace(0,1,5), dataset='mesh01')
Fri, 10 Feb 2017 16:26 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
<ParameterSet: 2 parameters | contexts: compute, dataset>
b.run_compute()
Fri, 10 Feb 2017 16:26 BUNDLE       WARNING overwriting model: latest
Fri, 10 Feb 2017 16:26 BUNDLE       WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
<ParameterSet: 364 parameters | kinds: mesh, lc>

Since the luminosities are passband-dependent, they are stored with the same dataset as the light curve (or RV), but with the mesh method, and are available at each of the times at which a mesh was stored.

print b.filter(qualifier='pblum', context='model').twigs
['0.0@pblum@primary@lc01@phoebe01@latest@mesh@model', '0.25@pblum@primary@lc01@phoebe01@latest@mesh@model', '0.5@pblum@primary@lc01@phoebe01@latest@mesh@model', '0.75@pblum@primary@lc01@phoebe01@latest@mesh@model', '1.0@pblum@primary@lc01@phoebe01@latest@mesh@model', '0.0@pblum@secondary@lc01@phoebe01@latest@mesh@model', '0.25@pblum@secondary@lc01@phoebe01@latest@mesh@model', '0.5@pblum@secondary@lc01@phoebe01@latest@mesh@model', '0.75@pblum@secondary@lc01@phoebe01@latest@mesh@model', '1.0@pblum@secondary@lc01@phoebe01@latest@mesh@model']

Now let’s compare the value of the synthetic luminosities to those of the input pblum

t0 = b.get_value('t0@system')
print b.get_value(qualifier='pblum', time=t0, component='primary', kind='mesh', context='model')
12.5663706144
print b.get_value('pblum@primary@dataset')
12.5663706144

In this case, since our two stars are identical, the synthetic luminosity of the secondary star should be the same as the primary (and the same as pblum@primary).

print b.get_value(qualifier='pblum', time=t0, component='primary', kind='mesh', context='model')
12.5663706144
print b.get_value(qualifier='pblum', time=t0, component='secondary', kind='mesh', context='model')
12.5663706144

However, if we change the temperature of the secondary star again, since the pblums are coupled, we’d expect the synthetic luminosity of the primary to remain fixed but the secondary to decrease.

b['teff@secondary@component'] = 5000
Fri, 10 Feb 2017 16:27 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
b.run_compute()
Fri, 10 Feb 2017 16:27 BUNDLE       WARNING overwriting model: latest
Fri, 10 Feb 2017 16:27 BUNDLE       WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
<ParameterSet: 364 parameters | kinds: mesh, lc>
print b.get_value(qualifier='pblum', time=t0, component='primary', kind='mesh', context='model')
12.5663706144
print b.get_value(qualifier='pblum', time=t0, component='secondary', kind='mesh', context='model')
0.90655293797

Now, we’ll just undo our changes before continuing

b.set_value_all('teff@component', 10000)
Fri, 10 Feb 2017 16:28 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32
Fri, 10 Feb 2017 16:28 PARAMETERS   WARNING 'primary' probably has a radiative atm (teff=10000K>8000K), for which gravb_bol=1.00 might be a better approx than gravb_bol=0.32

Role of Pblum

Let’s now look at the intensities in the mesh to see how they’re being scaled under-the-hood.

areas = b.get_value(qualifier='areas', dataset='mesh01', time=t0, component='primary', unit='m^2')
abs_normal_intensities = b.get_value(qualifier='abs_normal_intensities', dataset='lc01', time=t0, component='primary')
normal_intensities = b.get_value(qualifier='normal_intensities', dataset='lc01', time=t0, component='primary')

‘abs_normal_intensities’ are the intensities per triangle in absolute units, i.e. W/m^3.

np.median(abs_normal_intensities)
481956207559362.31

The values of ‘normal_intensities’, however, are significantly samller (in this case). These are the intensities in relative units which will eventually be integrated to give us flux for a light curve.

np.median(normal_intensities)
6.4759477646326206e-19

‘normal_intensities’ are scaled from ‘abs_normal_intensities’ so that the comuted luminosity matches the prescribed luminosity (pblum).

Here we compute the luminosity by summing over each triangle’s intensity in the normal direction, and multiply it by pi to account for blackbody intensity emitted in all directions in the solid angle, and by the area of that triangle.

pblum = b.get_value(qualifier='pblum', component='primary', context='dataset')
print np.sum(normal_intensities * np.pi * areas), pblum
12.5663706144 12.5663706144
Prev: Systemic Velocity Next: “Third” Light
.
Last update: 06/07/2017 11:30 a.m. (CET)