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

Extinction is not self-consistent internally #74

Open
keflavich opened this issue May 4, 2021 · 0 comments
Open

Extinction is not self-consistent internally #74

keflavich opened this issue May 4, 2021 · 0 comments

Comments

@keflavich
Copy link
Contributor

The Extinction module wants chi defined in cm^2/g:

https://github.com/astrofrog/sedfitter/blob/master/sedfitter/extinction/extinction.py#L41-L43

but the function get_av treats chi as if it is a pure opacity:
https://github.com/astrofrog/sedfitter/blob/master/sedfitter/extinction/extinction.py#L86-L87

I guess the idea is that chi is "tau per (cm^2 / g)", so just multiplying by -0.4 turns it to a magnitude?

In any case, I suggest the following approach for generating extinction objects, based on Karl Gordon's dust extinction:

from dust_extinction.parameter_averages import F19

# a_v to N(H) from https://arxiv.org/pdf/0903.2057.pdf
# m(particle) ~ 1.34 m(H) from memory...
guyver2009_avtocol = (2.21e21 * u.cm**-2 * (1.34*u.Da)).to(u.g/u.cm**2)
ext_wav = np.sort((np.geomspace(0.301, 8.699, 1000)/u.um).to(u.um, u.spectral()))
ext_vals = ext.evaluate(ext_wav, Rv=3.1)
extinction = Extinction()
extinction.wav = ext_wav
extinction.chi = ext_vals / guyver2009_avtocol

but I'd like to know if this looks halfway reasonable?

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

No branches or pull requests

1 participant