24 #include "cheetah/data/PowerSeries.h" 31 using boost::math::complement;
32 using boost::math::cdf;
33 using boost::math::quantile;
35 template <
typename Arch,
typename ValueType,
typename Alloc>
37 :
PowerSeries<Arch, ValueType, Alloc>(1.0 * hz, 2, size, allocator)
41 template <
typename Arch,
typename ValueType,
typename Alloc>
46 template <
typename Arch,
typename ValueType,
typename Alloc>
48 , std::size_t
size, Allocator
const& allocator)
50 , _dof(degrees_of_freedom)
57 template <
typename Arch,
typename ValueType,
typename Alloc>
63 template <
typename Arch,
typename ValueType,
typename Alloc>
67 _distribution = ChiSquaredType(_dof);
70 template <
typename Arch,
typename ValueType,
typename Alloc>
73 return cdf(complement(_distribution,(
double) power));
76 template <
typename Arch,
typename ValueType,
typename Alloc>
79 return (
float) quantile(complement(_gaussian,
pvalue(power)));
82 template <
typename Arch,
typename ValueType,
typename Alloc>
85 double p = cdf(complement(_gaussian,(
double) sigma));
86 return (
float) quantile(complement(_distribution,p));
FourierFrequencyType const & frequency_step() const
Retrieve the frequency step of the series.
float power_to_equiv_sigma(float power) const
For a given power level compute the Gaussian equivalent sigma.
PowerSeries(std::size_t size=0, Allocator const &allocator=Allocator())
Create a new default PowerSeries instance.
A container of Fourier series data.
Some limits and constants for FLDO.
Class for power series (detected FrequencySeries).
float equiv_sigma_to_power(float sigma) const
Compute the power that corresponds to a Gaussian equivalent sigma.
double pvalue(float power) const
Return the statistical probability of a given power level occurring.
std::size_t size() const
the size of the series
double degrees_of_freedom() const
Retreive the (assumed) degrees of freedom of the data distribution.