<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Atmospheres & Passbands
Setup
Let's first make sure we have the latest version of PHOEBE 2.4 installed (uncomment this line if running in an online notebook session such as colab).
Step1:  As always, let's do imports and initialize a logger and a new bundle.
Step2:  And we'll add a single light curve dataset to expose all the passband-dependent options.
Step3:  Relevant Parameters
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).
Step4:  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).
Step5:  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.
Step6:  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.
Step7:  To see your current locally-installed passbands, call phoebe.list_installed_passbands().
Step8:  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).
Step9:  To see the passbands available from the online repository, call phoebe.list_online_passbands().
Step10:  Lastly, to manually download and install one of these online passbands, you can do so explicitly via phoebe.download_passband or by visiting tables.phoebe-project.org.  See also the tutorial on updating passbands.
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).
<ASSISTANT_TASK:>
Python Code:
#!pip install -I "phoebe>=2.4,<2.5"
Explanation: Atmospheres & Passbands
Setup
Let's first make sure we have the latest version of PHOEBE 2.4 installed (uncomment this line if running in an online notebook session such as colab).
End of explanation
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
Explanation: As always, let's do imports and initialize a logger and a new bundle.
End of explanation
b.add_dataset('lc', times=np.linspace(0,1,101), dataset='lc01')
Explanation: And we'll add a single light curve dataset to expose all the passband-dependent options.
End of explanation
b['atm']
b['atm@primary']
b['atm@primary'].description
b['atm@primary'].choices
Explanation: Relevant Parameters
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).
End of explanation
b['ld_func@primary']
b['atm@primary'] = 'blackbody'
print(b.run_checks())
b['ld_mode@primary'] = 'manual'
b['ld_func@primary'] = 'logarithmic'
print(b.run_checks())
Explanation: 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).
End of explanation
b['passband']
Explanation: 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.
End of explanation
print(b['passband'].choices)
Explanation: 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.
End of explanation
print(phoebe.list_installed_passbands())
Explanation: To see your current locally-installed passbands, call phoebe.list_installed_passbands().
End of explanation
print(phoebe.list_passband_directories())
Explanation: 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).
End of explanation
print(phoebe.list_online_passbands())
Explanation: To see the passbands available from the online repository, call phoebe.list_online_passbands().
End of explanation
phoebe.download_passband('Cousins:R')
print(phoebe.list_installed_passbands())
Explanation: Lastly, to manually download and install one of these online passbands, you can do so explicitly via phoebe.download_passband or by visiting tables.phoebe-project.org.  See also the tutorial on updating passbands.
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).
End of explanation
<END_TASK>