POSYDON-code / POSYDON

POSYDON is a next-generation single and binary-star population synthesis code incorporating full stellar structure and evolution modeling with the use of MESA.
BSD 3-Clause "New" or "Revised" License
29 stars 19 forks source link

Weighting of TNG metallicity distribution #282

Closed maxbriel closed 3 months ago

maxbriel commented 6 months ago

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 b06739cafb54c45a54001f4b314833f6d1f179fe 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.