ExcisionHistoryPlotter.h
1 /***************************************************************************
2  *
3  * Copyright (C) 2002 by Willem van Straten
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 #ifndef __ExcisionHistoryPlotter_h
8 #define __ExcisionHistoryPlotter_h
9 
10 #include <sys/time.h>
11 #include <vector>
12 
13 #include "dsp/ExcisionHistory.h"
14 #include "dsp/ExcisionStatsPlotter.h"
15 
16 namespace dsp {
17 
21  class ExcisionHistoryPlotter : public ExcisionHistory {
22 
23  public:
24 
25  ExcisionHistoryPlotter () { ndig = 0; keep_minutes = 150; }
26 
27  virtual ~ExcisionHistoryPlotter() {}
28 
30  void reset () { ndig = 0; }
31 
33  virtual void log_stats (std::vector<double>& mean,
34  std::vector<double>& variance,
35  ExcisionUnpacker* stats);
36 
37  // the number of minutes to keep in history
38  float keep_minutes;
39 
40  protected:
41 
44 
46  timeval start;
47 
49  std::vector< std::vector<float> > means;
51  std::vector< std::vector<float> > variances;
53  std::vector< float > times;
54 
56  std::vector<int> colour;
58  std::vector<int> symbol;
59 
61  unsigned ndig;
62 
64  void init_stats_log (ExcisionUnpacker* converter);
65 
66  };
67 
68 }
69 
70 #endif
virtual void log_stats(std::vector< double > &mean, std::vector< double > &variance, ExcisionUnpacker *stats)
Log the statistics of the digitized data in some form.
void init_stats_log(ExcisionUnpacker *converter)
this gets called on the first call
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
std::vector< float > times
Time of each index in minutes since start.
Definition: ExcisionHistoryPlotter.h:63
std::vector< std::vector< float > > means
Data mean as a function of time and digitizer.
Definition: ExcisionHistoryPlotter.h:59
Definition: ExcisionHistoryPlotter.h:26
std::vector< std::vector< float > > variances
Data variance as a function of time and digitizer.
Definition: ExcisionHistoryPlotter.h:61
ExcisionStatsPlotter stat
Two-bit digitization histogram plotter.
Definition: ExcisionHistoryPlotter.h:53
timeval start
Time of the first call to log_stats.
Definition: ExcisionHistoryPlotter.h:56
void reset()
Reset the history.
Definition: ExcisionHistoryPlotter.h:40
Plots the histograms maintained by ExcisionUnpacker.
Definition: ExcisionStatsPlotter.h:26
std::vector< int > symbol
Shapes of symbols.
Definition: ExcisionHistoryPlotter.h:68
std::vector< int > colour
Colours of symbol.
Definition: ExcisionHistoryPlotter.h:66
Excises digitized data with statistics outside of acceptable limits.
Definition: ExcisionUnpacker.h:28
unsigned ndig
number of digitizers
Definition: ExcisionHistoryPlotter.h:71

Generated using doxygen 1.8.17