#!pip install -I "phoebe>=2.3,<2.4"

"""
Explanation: Extinction (ebv, Av, & Rv)
Setup
Let's first make sure we have the latest version of PHOEBE 2.3 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).
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
"""


print(b.filter(qualifier='ebv'))

print(b.get_parameter(qualifier='ebv', context='system'))

print(b.get_parameter(qualifier='ebv', context='constraint'))

print(b.get_parameter(qualifier='Av'))

print(b.get_parameter(qualifier='Rv'))

"""
Explanation: NOTE extinction parameters were moved from the dataset to system context in the 2.3 release
Relevant Parameters
Extinction is parameterized by 3 parameters: ebv (E(B-V)), Av, and Rv.  Of these three, two can be provided and the other must be constrained.  By default, ebv is the constrained parameter.  To change this, see the tutorial on constraints and the b.flip_constraint API docs.
End of explanation
"""


