Events¶
-
class
astropy.stats.
Events
(p0=0.05, gamma=None, ncp_prior=None)[source] [edit on github]¶ Bases:
astropy.stats.FitnessFunc
Bayesian blocks fitness for binned or unbinned events
Parameters: - p0 : float (optional)
False alarm probability, used to compute the prior on \(N_{\rm blocks}\) (see eq. 21 of Scargle 2012). For the Events type data,
p0
does not seem to be an accurate representation of the actual false alarm probability. If you are using this fitness function for a triggering type condition, it is recommended that you run statistical trials on signal-free noise to determine an appropriate value ofgamma
orncp_prior
to use for a desired false alarm rate.- gamma : 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 : 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})\). Ifncp_prior
is specified,gamma
andp0
is ignored.
Methods Summary
fitness
(N_k, T_k)validate_input
(t, x, sigma)Validate inputs to the model. Methods Documentation
-
fitness
(N_k, T_k)[source] [edit on github]¶
-
validate_input
(t, x, sigma)[source] [edit on github]¶ Validate inputs to the model.
Parameters: - t : array_like
times of observations
- x : array_like (optional)
values observed at each time
- sigma : float or array_like (optional)
errors in values x
Returns: - t, x, sigma : array_like, float or None
validated and perhaps modified versions of inputs