DigitiserCountsPlot.h
1/***************************************************************************
2 *
3 * Copyright (C) 2007 by David Smith
4 * Licensed under the Academic Free License version 2.1
5 *
6 ***************************************************************************/
7
8
9
10#ifndef DIGITISER_COUNTS_PLOT_H_
11#define DIGITISER_COUNTS_PLOT_H_
12
13
14
15#include "Pulsar/SimplePlot.h"
16#include <Pulsar/DigitiserCounts.h>
17#include <vector>
18
19
20
21using std::pair;
22using std::vector;
23
24
25
26namespace Pulsar
27{
29 class DigitiserCountsPlot : public SimplePlot
30 {
31 public:
33
35
37 void preprocess (Archive* archive);
38
39 class Interface : public TextInterface::To<DigitiserCountsPlot>
40 {
41 public:
42 Interface( DigitiserCountsPlot *s_instance = NULL );
43 };
44
45 void CheckCounts( const Archive *data );
46
47 void prepare( const Archive *data );
48 void draw( const Archive *data );
49
50 std::string get_xlabel( const Archive *data );
51 std::string get_ylabel( const Archive *data );
52
53 pair<int,int> get_srange() const { return srange; }
54 void set_srange( const pair<int,int> &s_srange ) { srange = s_srange; }
55 void set_srange( int fsub, int lsub ) { set_srange( pair<int,int>( fsub, lsub) ); }
56
57 int get_subint( void ) const { return subint; }
58 void set_subint( int s_subint ) { subint = s_subint; }
59
60 bool get_logscale () const { return logscale; }
61 void set_logscale (bool f) { logscale = f; }
62
63 // fraction of the maximum below which data are considered zero
64 double get_zero_threshold () const { return zero_threshold; }
65 void set_zero_threshold (double f) { zero_threshold = f; }
66
67 private:
68 double zero_threshold;
69 bool logscale;
70
71 float min_count;
72 float max_count;
73 float y_jump;
74 int first_nz;
75 int last_nz;
76 int subint;
77 pair<int,int> srange;
78
79 bool valid_data;
80 };
81}
82
83
84
85#endif
86
87
The primary interface to pulsar observational data.
Definition Archive.h:46
DigitiserCountsPlot()
Constructor.
Definition DigitiserCountsPlot.C:35
void prepare(const Archive *data)
prepare
Definition DigitiserCountsPlot.C:120
std::string get_ylabel(const Archive *data)
get_ylabel
Definition DigitiserCountsPlot.C:402
TextInterface::Parser * get_interface()
get_interface
Definition DigitiserCountsPlot.C:58
void CheckCounts(const Archive *data)
CheckCounts.
Definition DigitiserCountsPlot.C:81
DigitiserCountsPlot()
Constructor.
Definition DigitiserCountsPlot.C:35
void draw(const Archive *data)
draw
Definition DigitiserCountsPlot.C:273
std::string get_xlabel(const Archive *data)
get_xlabel
Definition DigitiserCountsPlot.C:385
void preprocess(Archive *archive)
disable default pre-processing of Plot base class
Definition DigitiserCountsPlot.C:64
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0