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

Weighting of TNG metallicity distribution #282

Open
maxbriel opened this issue Mar 22, 2024 · 0 comments
Open

Weighting of TNG metallicity distribution #282

maxbriel opened this issue Mar 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@maxbriel
Copy link
Collaborator

The distribution metallicity from the TNG simulation has incorrect weights at the high metallicity end, because of 2 reasons:

  1. The code uses interp1d to extrapolate the cumulative density function. This results in CDF values above 1 due to the extrapolation. This should not happen.
  2. Metallicity above the highest bin edge is not included in the binning. Using the standard metallicities, this results in some very high SF not being included in the metallicity distribution. SF below the lowest metallicity bin is included in the lowest bin.

This can be fixed by:

  1. Adding 1 additional point to the interp1d input: $Z=1$ (in absolute metallicity units) with CDF=1, since this is per definition the maximum possible metallicity fraction. The fixed the values above 1 from the extrapolation and now only requires interpolation.
  2. The fraction of SF above the maximum bin is added to the highest metallicity bin considered. Similar to how this is done for the lowest bin.

Commit b06739c shows the fix for the new analysis framework. I won't be back propagating this to the development branch for now, since hopefully the max_synpop_population branch will be merged soon.

@maxbriel maxbriel added the bug Something isn't working label Mar 22, 2024
@maxbriel maxbriel self-assigned this Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant