metallicity_distributions module

Metallicity distribution function from COMPAS

DH0001_file

syntheticstellarpopconvolve.metallicity_distributions.compas_log_skew_normal_distribution_metallicity_distribution(redshifts, log_metallicity_centers, mu0, muz, sigma_0, sigma_z, alpha, global_logZ_distribution_min=-20, global_logZ_distribution_max=0, global_logZ_distribution_res=1000)[source]

Calculate the distribution of metallicities at different redshifts using a log skew normal distribution the log-normal distribution is a special case of this log skew normal distribution distribution, and is retrieved by setting the skewness to zero (alpha = 0).

Based on the method in Neijssel+19.

Default values of mu0=0.035, muz=-0.23, sigma_0=0.39, sigma_z=0.0, alpha =0.0, retrieve the dP/dZ distribution used in Neijssel+19

NOTE: This assumes that metallicities in COMPAS are drawn from a flat in log distribution!

Parameters:
  • calculation (redshift_step --> [float] step used in redshift)

  • calculation

  • location (muz = -0.25 --> [float] redshift scaling/evolution of the)

  • location

  • Scale (sigma_0 = 0.39 --> [float])

  • scale (sigma_z = 0.00 --> [float] redshift scaling of the)

  • shape (alpha = 0.00 --> [float])

  • dPdlogZ (max_logZ --> [float] Maximum logZ at which to calculate)

  • dPdlogZ

  • range (step_logZ --> [float] Size of logZ steps to take in finding a Z)

Returns:

dPdlogZ –> [2D float array] Probability of getting a particular logZ at a certain redshift p_draw_metallicity –> float Probability of drawing a certain metallicity in COMPAS (float because assuming uniform)

syntheticstellarpopconvolve.metallicity_distributions.mean_metallicity(z, z0, alpha)[source]

Function for mean metallicity

syntheticstellarpopconvolve.metallicity_distributions.mean_mu(z, z0, alpha, sigma)[source]

Function to calculate mu

syntheticstellarpopconvolve.metallicity_distributions.metallicity_distribution_Neijsel19(log_metallicity_centers, redshifts)[source]

Function to calculate the metallicity distribution fraction at a given redshift according to Neijsel et al 2019 (https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.3740N/abstract)

TODO: add kwargs so user can override anything

syntheticstellarpopconvolve.metallicity_distributions.metallicity_distribution_dummy(constant=1)[source]

Dummy metallicity distribution, based on the same functional form as neijsel et al 2019 (https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.3740N/abstract)

syntheticstellarpopconvolve.metallicity_distributions.metallicity_distribution_lognormal(Z, z, z0, alpha, sigma)[source]

Function to calculate the metallicity distribution on a grid of redshifts and metallicity according to a lognormal distribution.

See Neijsel et al 2019 (https://ui.adsabs.harvard.edu/abs/2019MNRAS.490.3740N/abstract) section 4.

Function returns \(dP(z)/dZ\)

syntheticstellarpopconvolve.metallicity_distributions.metallicity_distribution_vanSon2022(log_metallicity_centers, redshifts)[source]

Function to calculate the metallicity distribution fraction as a function of redshift according to van Son et al. 2022

TODO: add kwargs so user can override anything