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

Trapezoidal integration of stellar age weights #78

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Trapezoidal integration of stellar age weights #78

merged 2 commits into from
Nov 28, 2023

Conversation

aphearin
Copy link
Collaborator

@aphearin aphearin commented Nov 3, 2023

Trapezoidal integration of stellar age weights

@aphearin
Copy link
Collaborator Author

aphearin commented Nov 3, 2023

This PR is motivated by the observation that for some edge cases where the SFH table of a galaxy is tabulated very near the edge of the stellar age bins used to calculate the PDF of stellar ages, DSPS appears to have numerical noise in estimating P(τ) for very young stars. In experimenting with particularly problematic examples, trapezoidal integration for the calculation of the log10(SMH) table appears to resolve the issue.

Note that the stellar age PDF calculation still uses the _jax_get_dt_array function to define the τ_age bin edges from the SSP τ_age grid. It's only in the calculation of cumulative Mstar at the bin edges that _jax_get_dt_array is no longer used. This plot shows an outlier example where the effect is extreme.

stellar_age_trapezoid_comparison

@aphearin aphearin merged commit 20a2c40 into main Nov 28, 2023
5 checks passed
@aphearin aphearin deleted the trapz_smh branch November 28, 2023 17:26
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

Successfully merging this pull request may close these issues.

1 participant