PointMeasures#

class astropy.stats.PointMeasures(p0: float = 0.05, gamma: float | None = None, ncp_prior: float | None = None)[source]#

Bases: FitnessFunc

Bayesian blocks fitness for point measures.

Parameters:
p0python:float, optional

False alarm probability, used to compute the prior on \(N_{\rm blocks}\) (see eq. 21 of Scargle 2013). If gamma is specified, p0 is ignored.

gammapython:float, optional

If specified, then use this gamma to compute the general prior form, \(p \sim {\tt gamma}^{N_{\rm blocks}}\). If gamma is specified, p0 is ignored.

ncp_priorpython:float, optional

If specified, use the value of ncp_prior to compute the prior as above, using the definition \({\tt ncp\_prior} = -\ln({\tt gamma})\). If ncp_prior is specified, gamma and p0 are ignored.

Methods Summary

fitness(a_k, b_k)

validate_input(t, x, sigma)

Validate inputs to the model.

Methods Documentation

fitness(a_k: NDArray[float], b_k: ArrayLike) NDArray[float][source]#
validate_input(t: ArrayLike, x: ArrayLike | None, sigma: float | ArrayLike | None) tuple[NDArray[float], NDArray[float], NDArray[float]][source]#

Validate inputs to the model.

Parameters:
tnumpy:array_like

times of observations

xnumpy:array_like, optional

values observed at each time

sigmapython:float or numpy:array_like, optional

errors in values x

Returns:
t, x, sigmanumpy:array_like, python:float

validated and perhaps modified versions of inputs