SKLimits.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 - 2023 by Andrew Jameson and Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __dsp_Signal_Statistics_SKLimits_h
10 #define __dsp_Signal_Statistics_SKLimits_h
11 
12 #include "dsp/PearsonIV.h"
13 #include "dsp/PearsonVI.h"
14 #include "ReferenceTo.h"
15 
16 namespace dsp {
17 
19 
30  class SKLimits {
31 
32  public:
33 
34  SKLimits (unsigned M, float std_devs);
35 
36  ~SKLimits ();
37 
38  void calc_limits ();
39 
40  double get_lower_threshold() const { return lower_threshold; }
41 
42  double get_upper_threshold() const { return upper_threshold; }
43 
44  double get_symmetric_threshold() const { return symmetric_threshold; }
45 
47  void set_M (unsigned M);
48 
50 
51  void set_Nd (unsigned Nd);
52 
54  void set_std_devs (float std_devs);
55 
57 
58  void set_fwer (float fwer);
59 
61 
62  void set_ntest (unsigned ntest);
63 
65  dsp::ProbabilityDensity* get_pdf () { return pdf; }
66 
68  static PearsonIV::Parameters parametersIV (double M);
69 
71  static PearsonIV::Parameters parametersIV (double M, double Nd);
72 
74  static PearsonVI::Parameters parametersVI (double M, double Nd);
75 
76  private:
77 
79  void prepare();
80 
81  double lower_threshold = 0.0;
82 
83  double upper_threshold = 0.0;
84 
85  double symmetric_threshold = 0.0;
86 
88  unsigned M = 0;
89 
91  unsigned Nd = 1;
92 
94  double family_wise_error_rate = 0;
95 
97  double per_comparison_error_rate = 0;
98 
100  double per_comparison_std_devs = 0;
101 
103  unsigned ntest = 1;
104 
106  };
107 }
108 
109 #endif
Computes the upper and lower bounds on estimates of the generalized spectral kurtosis.
Definition: SKLimits.h:35
static PearsonVI::Parameters parametersVI(double M, double Nd)
Equation (9) of Nita & Gary (2010b)
Definition: SKLimits.C:113
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
void set_ntest(unsigned ntest)
Set the number of times that a given sample will be tested.
Definition: SKLimits.C:64
void set_M(unsigned M)
Set the number of intensity samples used to estimate the spectral kurtosis.
Definition: SKLimits.C:40
const ScalarMath log(const ScalarMath &x)
const ScalarMath sqrt(const ScalarMath &x)
dsp::ProbabilityDensity * get_pdf()
Get the probability density function appropriate to the input values of M and Nd.
Definition: SKLimits.h:75
void set_std_devs(float std_devs)
Set the number of standard deviations used to define the family-wise error rate.
Definition: SKLimits.C:46
void set_fwer(float fwer)
Set the family-wise error rate.
Definition: SKLimits.C:58
bool verbose
static PearsonIV::Parameters parametersIV(double M)
Equation (53) of Nita & Gary (2010a)
Definition: SKLimits.C:71
void set_Nd(unsigned Nd)
Set the number of Nyquist-sampled intensities integrated in each intensity sample.
Definition: SKLimits.C:34
Definition: CumulativeDistribution.h:24

Generated using doxygen 1.8.17