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()
In [3]:
b.add_dataset('lc')
print b.filter(kind='lc')
In [4]:
print b.filter(kind='lc_dep')
In [5]:
print b['times']
In [6]:
print b['fluxes']
In [7]:
print b['sigmas']
In [8]:
print b['ld_func@primary']
ld_coeffs will only be available if ld_func is not interp, so let's set it to logarithmic
In [9]:
b['ld_func@primary'] = 'logarithmic'
In [10]:
print b['ld_coeffs@primary']
In [11]:
print b['passband']
See the Intensity Weighting tutorial
In [12]:
print b['intens_weighting']
See the Passband Luminosity tutorial
In [13]:
print b['pblum']
See the "Third" Light tutorial
In [14]:
print b['l3']
Let's look at the compute options (for the default PHOEBE 2 backend) that relate to computing fluxes and the LC dataset.
Other compute options are covered elsewhere:
In [15]:
print b['compute']
In [16]:
print b['lc_method']
In [17]:
print b['irrad_method']
In [18]:
print b['boosting_method']
For more details on boosting, see the Beaming and Boosting example script
In [19]:
print b['atm@primary']
For more details on heating, see the Reflection and Heating example script
In [20]:
b.set_value('times', np.linspace(0,1,101))
In [21]:
b.run_compute()
Out[21]:
In [22]:
b['lc@model'].twigs
Out[22]:
In [23]:
print b['times@lc@model']
In [24]:
print b['fluxes@lc@model']
In [25]:
afig, mplfig = b['lc@model'].plot(show=True)
Since these are the only two columns available in the synthetic model, the only other option is to plot in phase instead of time.
In [26]:
afig, mplfig = b['lc@model'].plot(x='phases', show=True)
In system hierarchies where there may be multiple periods, it is also possible to determine whose period to use for phasing.
In [27]:
b['period'].components
Out[27]:
In [28]:
afig, mplfig = b['lc@model'].plot(x='phases:binary', show=True)
In [29]:
b.add_dataset('mesh', times=[0], dataset='mesh01')
Out[29]:
In [30]:
print b['columns'].choices
In [31]:
b['columns'] = ['intensities@lc01', 'abs_intensities@lc01', 'normal_intensities@lc01', 'abs_normal_intensities@lc01', 'pblum@lc01', 'boost_factors@lc01']
In [32]:
b.run_compute()
Out[32]:
In [33]:
print b['model'].datasets
These new columns are stored with the lc's dataset tag, but with the 'mesh' dataset-kind.
In [34]:
b.filter(dataset='lc01', kind='mesh', context='model').twigs
Out[34]:
Any of these columns are then available to use as edge or facecolors when plotting the mesh (see the section on the mesh dataset).
In [35]:
afig, mplfig = b['mesh01@model'].plot(fc='intensities', ec='None', show=True)
Now let's look at each of the available fields.
For more details, see the tutorial on Passband Luminosities
In [36]:
print b['pblum@primary@lc01@mesh@model']
'pblum' is the passband luminosity of the entire star/mesh - this is a single value (unlike most of the parameters in the mesh) and does not have per-element values.
In [37]:
print b['abs_normal_intensities@primary@lc01@mesh@model']
'abs_normal_intensities' are the absolute normal intensities per-element.
In [38]:
print b['normal_intensities@primary@lc01@mesh@model']
'normal_intensities' are the relative normal intensities per-element.
In [39]:
print b['abs_intensities@primary@lc01@mesh@model']
'abs_intensities' are the projected absolute intensities (towards the observer) per-element.
In [40]:
print b['intensities@primary@lc01@mesh@model']
'intensities' are the projected relative intensities (towards the observer) per-element.
In [41]:
print b['boost_factors@primary@lc01@mesh@model']
'boost_factors' are the boosting amplitudes per-element.