Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include more uncertainties in A(V) calculation #102

Open
mdecleir opened this issue Jan 13, 2022 · 0 comments
Open

Include more uncertainties in A(V) calculation #102

mdecleir opened this issue Jan 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@mdecleir
Copy link
Collaborator

One way to calculate A(V) is from an assumed A(K)/A(V) value.:
Currently, the uncertainty on the A(K)/A(V) value is not taken into account in the uncertainty calculation of A(V).

At the same time, we might want to check if there are more up to date values for A(K)/A(V) in the literature?
Maybe it is possible to use the value from my NIR extinction paper (0.103 from the fit to the average diffuse curve)?

def calc_AV(self, akav=0.112):
"""
Calculate A(V) from the observed extinction curve:
- fit a powerlaw to the SpeX extinction curve, if available
- otherwise: extrapolate the K-band extinction
Parameters
----------
akav : float [default = 0.112]
Value of A(K)/A(V)
default is from Rieke & Lebofsky (1985)
van de Hulst No. 15 curve has A(K)/A(V) = 0.0885
Returns
-------
Updates self.columns["AV"]
"""
# if SpeX extinction curve is available: compute A(V) by fitting the NIR extintion curve with a powerlaw.
if "SpeX_SXD" in self.waves.keys() or "SpeX_LXD" in self.waves.keys():
self.fit_spex_ext()
# if no SpeX spectrum is available: compute A(V) from E(K-V)
else:
dwaves = np.absolute(self.waves["BAND"] - 2.19 * u.micron)
kindx = dwaves.argmin()
if dwaves[kindx] > 0.04 * u.micron:
warnings.warn(
"No K band measurement available in E(lambda-V)!", stacklevel=2
)
else:
ekv = self.exts["BAND"][kindx]
self.columns["AV"] = ekv / (akav - 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants