marnoch_model

class zdm.optical.marnoch_model(OpticalState=None)[source]

Bases: object

Class initiates a model based on Lachlan Marnoch’s predictions for FRB host galaxy visibility in https://ui.adsabs.harvard.edu/abs/2023MNRAS.525..994M/abstract Here, we assume that host galaxy magnitudes have a normal distribution, with mean and standard deviation given by L. Marnoch’s data.

Methods Summary

get_pmr_gz(mrbins, z)

Return the apparent magnitude probability distribution p(m_r | z).

load_data()

Loads the Marnoch et al data on r-band magnitudes from FRB hosts

process_rbands()

Build cubic spline fits to the mean and rms of p(m_r) as a function of z.

Methods Documentation

get_pmr_gz(mrbins, z)[source]

Return the apparent magnitude probability distribution p(m_r | z).

Evaluates a Gaussian distribution whose mean and standard deviation are obtained from the cubic splines fit in process_rbands, and integrates it over the provided magnitude bins.

This model has no free parameters; the Gaussian moments are fully determined by the Marnoch et al. 2023 host galaxy data.

Parameters:
  • mrbins (array-like of float, length N+1) – Edges of the apparent magnitude bins over which to compute the probability. The output has length N (one value per bin).

  • z (float) – Redshift at which to evaluate the magnitude distribution.

Returns:

pmr – Probability in each magnitude bin (sums to ≤ 1; may be less than unity if the Gaussian extends beyond the bin range).

Return type:

np.ndarray, length N

load_data()[source]

Loads the Marnoch et al data on r-band magnitudes from FRB hosts

process_rbands()[source]

Build cubic spline fits to the mean and rms of p(m_r) as a function of z.

Reads the per-FRB r-band magnitude columns from self.table, computes their mean (Rbar) and sample standard deviation (Rrms) across all FRBs at each tabulated redshift, then fits two cubic splines:

  • self.sbar: CubicSpline interpolating the mean apparent magnitude as a function of redshift.

  • self.srms: CubicSpline interpolating the rms scatter as a function of redshift.

These splines are subsequently used by get_pmr_gz to evaluate the Gaussian p(m_r | z) at arbitrary redshifts.

__init__(OpticalState=None)[source]

Initialises the model. There are no variables here.

Parameters:

OpticalState – allows the model to refer to an optical state. However, the model is independent of that state.

load_data()[source]

Loads the Marnoch et al data on r-band magnitudes from FRB hosts

process_rbands()[source]

Build cubic spline fits to the mean and rms of p(m_r) as a function of z.

Reads the per-FRB r-band magnitude columns from self.table, computes their mean (Rbar) and sample standard deviation (Rrms) across all FRBs at each tabulated redshift, then fits two cubic splines:

  • self.sbar: CubicSpline interpolating the mean apparent magnitude as a function of redshift.

  • self.srms: CubicSpline interpolating the rms scatter as a function of redshift.

These splines are subsequently used by get_pmr_gz to evaluate the Gaussian p(m_r | z) at arbitrary redshifts.

get_pmr_gz(mrbins, z)[source]

Return the apparent magnitude probability distribution p(m_r | z).

Evaluates a Gaussian distribution whose mean and standard deviation are obtained from the cubic splines fit in process_rbands, and integrates it over the provided magnitude bins.

This model has no free parameters; the Gaussian moments are fully determined by the Marnoch et al. 2023 host galaxy data.

Parameters:
  • mrbins (array-like of float, length N+1) – Edges of the apparent magnitude bins over which to compute the probability. The output has length N (one value per bin).

  • z (float) – Redshift at which to evaluate the magnitude distribution.

Returns:

pmr – Probability in each magnitude bin (sums to ≤ 1; may be less than unity if the Gaussian extends beyond the bin range).

Return type:

np.ndarray, length N