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

birth cloud dust attenuation applied beyond dust_tesc #166

Open
changhoonhahn opened this issue Jun 11, 2021 · 3 comments
Open

birth cloud dust attenuation applied beyond dust_tesc #166

changhoonhahn opened this issue Jun 11, 2021 · 3 comments

Comments

@changhoonhahn
Copy link

changhoonhahn commented Jun 11, 2021

I ran into the following issue regarding the birth cloud dust attenuation:

I'm running StellarPopulation with dust_tesc=7.0, which I think means that only stellar populations with age < 1e7 should be affected by birth cloud dust attenuation. However, I find that when birth cloud dust attenuation is applied to stellar populations with age 1.1e7.

Below is an illustration. I generate spectra for a stellar population with tage=1.1e7. In one of the spectra, I set dust1 = 0.9; in the other I set dust1=0. Since tage > dust_tesc, I didn't expect there to be a difference between the two spectra but the figure below shows a significant difference.

Screen Shot 2021-06-11 at 9 51 42 AM

I find that for dust_tesc=7.0, birth cloud dust attenuation is applied up to tage=1.12e7yr

@bd-j
Copy link
Collaborator

bd-j commented Jun 11, 2021

Thanks for the detailed code. The units of dust_tesc are log(years) while the units of tage are Gyr. So the population you are obtaining from get_spectrum(tage=1.1e-7) is extremely young, try tage=1.1e-2 and see if the problem persists.

The docstring for get_mags and get_spectrum should be made explicit about the units of tage, I'll add that to updates I'm working on at the moment.

@changhoonhahn
Copy link
Author

Oops, that was a typo when I was trying to reproduce the bug. Here's the same issue with tage=1.1e-2:

Screen Shot 2021-06-11 at 10 44 05 AM

@bd-j
Copy link
Collaborator

bd-j commented Jun 11, 2021

This is because for requested ages between the native isochrone age gridpoints the output spectrum is interpolated from two SSPs. In your case one of the bracketing SSPs is at log(t)=7.0 and the second is at log(t)=7.05. The the first gets attenuated by dust1 and the second does not. This is actually an FSPS issue, can you reopen there?

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

2 participants