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()
And we'll add a single light curve dataset to expose all the passband-dependent options.
In [3]:
b.add_dataset('lc', times=np.linspace(0,1,101), dataset='lc01')
Out[3]:
An 'atm' parameter exists for each of the components in the system (for each set of compute options) and defines which atmosphere table should be used.
By default, these are set to 'ck2004' (Castelli-Kurucz) but can be set to 'blackbody' as well as 'extern_atmx' and 'extern_planckint' (which are included primarily for direct comparison with PHOEBE legacy).
In [4]:
b['atm']
Out[4]:
In [5]:
b['atm@primary']
Out[5]:
In [6]:
b['atm@primary'].description
Out[6]:
In [7]:
b['atm@primary'].choices
Out[7]:
Note that if you change the value of 'atm' to anything other than 'ck2004', the corresponding 'ld_func' will need to be changed to something other than 'interp' (warnings and errors will be raised to remind you of this).
In [8]:
b['ld_func@primary']
Out[8]:
In [9]:
b['atm@primary'] = 'blackbody'
In [10]:
print(b.run_checks())
In [11]:
b['ld_func@primary'] = 'logarithmic'
In [12]:
print(b.run_checks())
A 'passband' parameter exists for each passband-dependent-dataset (i.e. not meshes or orbits, but light curves and radial velocities). This parameter dictates which passband should be used for the computation of all intensities.
In [13]:
b['passband']
Out[13]:
The available choices will include both locally installed passbands as well as passbands currently available from the online PHOEBE repository. If you choose an online-passband, it will be downloaded and installed locally as soon as required by b.run_compute.
In [14]:
print(b['passband'].choices)
To see your current locally-installed passbands, call phoebe.list_installed_passbands().
In [15]:
print(phoebe.list_installed_passbands())
These installed passbands can be in any of a number of directories, which can be accessed via phoebe.list_passband_directories().
The first entry is the global location - this is where passbands can be stored by a server-admin to be available to all PHOEBE-users on that machine.
The second entry is the local location - this is where individual users can store passbands and where PHOEBE will download and install passbands (by default).
In [16]:
print(phoebe.list_passband_directories())
To see the passbands available from the online repository, call phoebe.list_online_passbands().
In [17]:
print(phoebe.list_online_passbands())
Lastly, to manually download and install one of these online passbands, you can do so explicitly via phoebe.download_passband.
Note that this isn't necessary unless you want to explicitly download passbands before needed by run_compute (perhaps if you're expecting to have unreliable network connection in the future and want to ensure you have all needed passbands).
In [18]:
phoebe.download_passband('Cousins:R')
In [19]:
print(phoebe.list_installed_passbands())
In [ ]: