redback.likelihoods.PoissonLikelihood
- class redback.likelihoods.PoissonLikelihood(*args: Any, **kwargs: Any)[source]
Bases:
_RedbackLikelihood
- __init__(time: ndarray, counts: ndarray, function: callable, integrated_rate_function: bool = True, dt: Optional[Union[float, ndarray]] = None, kwargs: Optional[dict] = None) None [source]
- Parameters:
time (np.ndarray) – The time values.
counts (np.ndarray) – The number of counts for the time value.
function (callable) – The python function to fit to the data.
integrated_rate_function (bool) – Whether the function returns an integrated rate over the dt in the bins. This should be true if you multiply the rate with dt in the function and false if the function returns a rate per unit time. (Default value = True)
dt (Union[float, None, np.ndarray]) – Array of each bin size or single value if all bins are of the same size. If None, assume that dt is constant and calculate it from the first two elements of time.
kwargs (dict) – Any additional keywords for ‘function’.
- __call__(*args: Any, **kwargs: Any) Any
Call self as a function.
Methods
__init__
(time, counts, function[, ...])- param time:
The time values.
- return:
The log-likelihood.
- return:
The noise log-likelihood, i.e. the log-likelihood assuming the signal is just noise.
Attributes
background_rate
counts
dt
kwargs
Length of the x/y-values :rtype: int
time
- property n: int
Length of the x/y-values :rtype: int
- Type:
return