pcosmic

zdm.pcosmic.pcosmic(delta, z, logF, C0)[source]

Probability density of fractional cosmic DM, p(delta|z).

Implements Equation 4 from Macquart et al. (2020) for the probability distribution of cosmic DM fluctuations. The distribution is parameterized such that delta = DM_cosmic / <DM_cosmic> follows a modified log-normal with redshift-dependent width.

Parameters:
  • delta (float or array_like) – Fractional cosmic DM, defined as DM_cosmic / <DM_cosmic>. Must be positive.

  • z (float) – Redshift. Used to compute the width parameter sigma = F * z^(-0.5).

  • logF (float) – Log10 of the feedback/fluctuation parameter F. Controls the width of the distribution. Typical values are logF ~ -0.5 to 0.

  • C0 (float) – Normalization constant that ensures <delta> = 1. Should be computed via iterate_C0() for each (z, F) pair.

Returns:

Probability density p(delta|z). Not normalized; integrate over delta for normalization.

Return type:

float or ndarray

Notes

Uses module-level constants alpha=3, beta=3 as shape parameters. The standard deviation scales as F * z^(-0.5), reflecting the central limit theorem averaging of IGM fluctuations along the line of sight.