RegularEvents#
- class astropy.stats.RegularEvents(dt: float, p0: float = 0.05, gamma: float | None = None, ncp_prior: float | None = None)[source]#
 Bases:
FitnessFuncBayesian blocks fitness for regular events.
This is for data which has a fundamental “tick” length, so that all measured values are multiples of this tick length. In each tick, there are either zero or one counts.
- Parameters:
 - dt
python:float tick rate for data
- p0
python: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.
- gamma
python: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_prior
python:float, optional If specified, use the value of
ncp_priorto compute the prior as above, using the definition \({\tt ncp\_prior} = -\ln({\tt gamma})\). Ifncp_prioris specified,gammaandp0are ignored.
- dt
 
Methods Summary
fitness(T_k, N_k)validate_input(t[, x, sigma])Validate inputs to the model.
Methods Documentation
- validate_input(t: ArrayLike, x: ArrayLike | None = None, sigma: float | ArrayLike | None = 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
- sigma
python:floator numpy:array_like, optional errors in values x
- Returns:
 - t, x, sigmanumpy:array_like, 
python:float validated and perhaps modified versions of inputs
- t, x, sigmanumpy:array_like,