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

DOC: extinction at a single wavelength use case #77

Open
karllark opened this issue Oct 11, 2018 · 0 comments
Open

DOC: extinction at a single wavelength use case #77

karllark opened this issue Oct 11, 2018 · 0 comments

Comments

@karllark
Copy link
Owner

Got an email about this use case. Email below and my response. Need to add docs for this use case. (Note name of user removed on purpose as I have not asked if they are ok having it in public).


Hi Karl,

I recently installed your dust_extinction package (thanks for coding this by the way!), but I think I am misunderstanding how to use it. I simply want to get the extinction in magnitudes of a given wavelength. I was using Fitzpatrick '99 and could not get the program to reproduce the A(lambda) "anchor points" published.

For example when I run the following code:

ext = F99(Rv=3.1)
ext(0.377)

I get the value of 0.08537820792950197. The Fitzpatrick paper says I should get 0.265.

I think that your code returns values in A(lambda)/A(V) and Fitzpatrick uses A(lambda)/E(B-V). Is there a built in switch I could use to get the published version instead of A(lambda)/A(V)?

Thank you so much for your time,
XXXXXX


Hi XXXX,
Glad you found and (may) use the dust_extinction package. The issue is that if you do not have units on the input x values, you need to input x as inverse microns. So, it should work if you use

ext(1.0/0.377)

if you would like the extinction at 0.377 microns. Alternatively, you can do

import astropy.units as u
ext(0.377*u.micron)

and that should work as well.

You will get the result in A(lambda)/A(V), so will need to multiply by the A(V) desired. Of course, if you have E(B-V) instead of A(V), then just multiply by R(V)*E(B-V).

Your question is a good one and I have opened an issue to add documentation for this use case.

Thanks,
Karl.

@karllark karllark added this to the v1.0 milestone Mar 27, 2020
@karllark karllark removed this from the v1.0 milestone Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant