redback.likelihoods.GaussianLikelihoodQuadratureNoiseNonDetections

class redback.likelihoods.GaussianLikelihoodQuadratureNoiseNonDetections(*args: Any, **kwargs: Any)[source]

Bases: GaussianLikelihoodQuadratureNoise

__init__(x: ndarray, y: ndarray, sigma_i: Union[float, ndarray], function: callable, kwargs: Optional[dict] = None, upperlimit_kwargs: Optional[dict] = None) None[source]

A general Gaussian likelihood - the parameters are inferred from the arguments of function. Takes into account non-detections with a Uniform likelihood for those points

Parameters:
  • y (np.ndarray) – The y values.

  • sigma_i (Union[float, None, np.ndarray]) – The standard deviation of the noise. This is part of the full noise. The sigma used in the likelihood is sigma = sqrt(sigma_i^2 + sigma^2)

  • function (callable) – The python function to fit to the data. Note, this must take the dependent variable as its first argument. The other arguments will require a prior and will be sampled over (unless a fixed value is given).

  • kwargs (dict) – Any additional keywords for ‘function’.

__call__(*args: Any, **kwargs: Any) Any

Call self as a function.

Methods

__init__(x, y, sigma_i, function[, kwargs, ...])

A general Gaussian likelihood - the parameters are inferred from the arguments of function.

log_likelihood()

return:

The log-likelihood.

log_likelihood_upper_limit()

return:

The log-likelihood due to the upper limit.

log_likelihood_y()

return:

The log-likelihood due to y-errors.

noise_log_likelihood()

return:

The noise log-likelihood, i.e. the log-likelihood assuming the signal is just noise.

Attributes

full_sigma

The standard deviation of the full noise :rtype: Union[float, np.ndarray]

kwargs

n

Length of the x/y-values :rtype: int

residual

sigma

upperlimit_flux

The upper limit of the flux.

property full_sigma: Union[float, ndarray]

The standard deviation of the full noise :rtype: Union[float, np.ndarray]

Type:

return

log_likelihood() float[source]
Returns:

The log-likelihood.

Return type:

float

log_likelihood_upper_limit() Any[source]
Returns:

The log-likelihood due to the upper limit.

Return type:

float

log_likelihood_y() float[source]
Returns:

The log-likelihood due to y-errors.

Return type:

float

property n: int

Length of the x/y-values :rtype: int

Type:

return

noise_log_likelihood() float
Returns:

The noise log-likelihood, i.e. the log-likelihood assuming the signal is just noise.

Return type:

float

property upperlimit_flux: float

The upper limit of the flux. :rtype: float

Type:

return