ExcisionStatsPlotter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2002 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Signal/General/dsp/ExcisionStatsPlotter.h
10 
11 #ifndef __ExcisionStatsPlotter_h
12 #define __ExcisionStatsPlotter_h
13 
14 #include "dsp/BitStatsPlotter.h"
15 
16 namespace dsp {
17 
18  class ExcisionUnpacker;
19 
21  class ExcisionStatsPlotter : public BitStatsPlotter {
22 
23  public:
24 
27 
29  virtual ~ExcisionStatsPlotter ();
30 
32  void set_data (const HistUnpacker* stats);
33 
35  std::string get_xlabel () const;
36 
38  std::string get_ylabel () const;
39 
41  int get_theory_colour () { return theory_colour; };
42 
44  double get_chi_squared (int idig);
45 
47  bool show_cutoff_sigma;
48 
50  bool plot_only_range;
51 
52  protected:
53 
55  std::vector<float> theory;
56 
58  float theory_max;
59 
61  bool theory_calculated;
62 
64  int theory_colour;
65 
68 
69  void calculate_theory ();
70  void set_theory_colour ();
71  void check_colours ();
72  bool special (unsigned imin, unsigned imax, float& ymax);
73 
74  };
75 
76 }
77 
78 #endif
const ScalarMath exp(const ScalarMath &x)
Bit unpacker that keeps a histogram and optimal statistics.
Definition: HistUnpacker.h:25
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
bool special(unsigned imin, unsigned imax, float &ymax)
Any special plotting implemented in derived classes.
Definition: ExcisionStatsPlotter.C:190
bool theory_calculated
Set true when the theoretical, optimal histogram is calculated.
Definition: ExcisionStatsPlotter.h:66
std::vector< float > theory
Theoretical, optimal histogram.
Definition: ExcisionStatsPlotter.h:60
int get_theory_colour()
Get the colour used to plot the theoretical distribution.
Definition: ExcisionStatsPlotter.h:46
const ScalarMath log(const ScalarMath &x)
void check_colours()
Ensure that colours for different digitizers are unique.
Definition: ExcisionStatsPlotter.C:181
virtual ~ExcisionStatsPlotter()
Virtual destructor.
Definition: ExcisionStatsPlotter.C:30
void set_data(const HistUnpacker *stats)
Set the data to be plotted.
Definition: ExcisionStatsPlotter.C:48
bool plot_only_range
Plot vertical bars to indicate the cut-off thresholds.
Definition: ExcisionStatsPlotter.h:55
std::string get_ylabel() const
The label on the y-axis.
Definition: ExcisionStatsPlotter.C:42
double get_chi_squared(int idig)
Get a measure of the difference between the histogram and the theory.
Definition: ExcisionStatsPlotter.C:133
bool show_cutoff_sigma
Plot vertical bars to indicate the cut-off thresholds.
Definition: ExcisionStatsPlotter.h:52
std::string get_xlabel() const
The label on the x-axis.
Definition: ExcisionStatsPlotter.C:34
float theory_max
Maxmimum value of theory.
Definition: ExcisionStatsPlotter.h:63
int theory_colour
Colour used when plotting theoretical.
Definition: ExcisionStatsPlotter.h:69
ExcisionStatsPlotter()
Null constructor.
Definition: ExcisionStatsPlotter.C:20
Reference::To< const ExcisionUnpacker > twobit
Data to be plotted.
Definition: ExcisionStatsPlotter.h:72
Excises digitized data with statistics outside of acceptable limits.
Definition: ExcisionUnpacker.h:28

Generated using doxygen 1.8.17