get_pDM

zdm.pcosmic.get_pDM(z, F, DMgrid, zgrid, Fgrid, C0grid, zlog=False)[source]

Compute p(DM|z) for a single redshift using pre-computed tables.

Parameters:
  • z (float) – Redshift.

  • F (float) – Log10 of feedback parameter.

  • DMgrid (ndarray) – DM values at which to evaluate the distribution.

  • zgrid (ndarray) – Redshift grid for C0 interpolation.

  • Fgrid (ndarray) – Feedback parameter grid for C0 interpolation.

  • C0grid (ndarray) – Pre-computed C0 values.

  • zlog (bool, optional) – If True, use log-spaced z grid. If False (default), use linear spacing.

Returns:

Probability density p(DM|z) at each DM grid point.

Return type:

ndarray