rxmc.likelihood_model.UnknownNoiseFractionErrorModel#

class rxmc.likelihood_model.UnknownNoiseFractionErrorModel[source]#

Bases: ParametricLikelihoodModel

A ParametricLikelihoodModel in which each data point in the observation has the a statistical error corresponding to a fixed fraction of it’s value, the fraction being a parameter, $epsilon$.

This implies the statistical contribution to the covariance takes the form:

\[\Sigma_{ij}^{stat} = \epsilon^2 y(x_i)^2 \delta_{ij}\]
__init__()[source]#

Initializes the LikelihoodModel, optionally with a fractional uncorrelated error.

Methods

__init__()

Initializes the LikelihoodModel, optionally with a fractional uncorrelated error.

chi2(observation, ym, *likelihood_params)

Calculate the generalised chi-squared statistic.

covariance(observation, ym, log_epsilon)

Returns the following covariance matrix:

log_likelihood(observation, ym, ...)

Returns the log likelihood that ym reproduces observation.y

residual(observation, ym)

Return the residual observation.y - ym.

covariance(observation: Observation, ym: ndarray, log_epsilon: float)[source]#

Returns the following covariance matrix:

\[\Sigma_{ij} = \sigma^2_{i}^{stat} \delta_{ij} + \Sigma_{ij}^{sys} + \gamma^2 y_m^2(x_i, \alpha)\]

where sigma^2_{i}^{stat} is the statistical variance of the i-th observation, which is dependent on the parameter $epsilon$, which is the statistical noise_fraction:

\[\Sigma_{ij}^{stat} = \epsilon^2 y(x_i)^2 \delta_{ij}\]

(note this class ignores observation.statistical_covariance, substituting it with the variable noise_fraction multiplied by ym) and $gamma$ is the fractional uncorrelated error (self.frac_err).

Parameters:
  • observation (Observation) – The observation object containing the observed data.

  • ym (np.ndarray) – Model prediction for the observation.

  • log_epsilon (float) – natural log of statistical noise as a fraction of observation.y

Returns:

np.ndarray – Covariance matrix of the observation.