CalibratorParameter.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2012 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/CalibratorSpectrum.h
10
11#ifndef __Pulsar_CalibratorParameter_h
12#define __Pulsar_CalibratorParameter_h
13
14#include "Pulsar/FrequencyPlot.h"
15#include "Pulsar/Calibrator.h"
16#include "Pulsar/Index.h"
17
18#include "EstimatePlotter.h"
19
20namespace Pulsar {
21
24 {
25
26 public:
27
30
33
35 std::string get_ylabel (const Archive*);
36
38 void set_managed (bool flag=true) { managed = flag; }
39
41 void prepare (const Archive*);
42
44 void prepare (const Calibrator::Info*, const Archive*);
45
47 void draw (const Archive*);
48
50 void set_class (unsigned i) { iclass = i; }
52 unsigned get_class () const { return iclass; }
53
55 void set_outlier_threshold (float t) { outlier_threshold = t; }
57 float get_outlier_threshold () const { return outlier_threshold; }
58
60 void set_subint (const Index& isub) { subint = isub; }
62 Index get_subint () const { return subint; }
63
65 static Calibrator::Info* get_Info (const Archive*, Index subint,
66 float outlier_threshold);
67
68 protected:
69
70 EstimatePlotter plotter;
71
72 // Text interface to the CalibratorParameter class
73 class Interface;
74
75 // Calibrator info derived from the input archive
77
78 // The index of the class of parameters to be plotted
79 unsigned iclass;
80
81 // Flag set to true when data are managed externally (disables prepare)
82 bool managed;
83
84 // Sub-integration from which to derive a solution
85 Index subint;
86
87 // Threshold used to detect outliers when creating a SingleAxis calibrator
88 float outlier_threshold;
89 };
90
91}
92
93#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
void draw(const Archive *)
Draw the spectra.
Definition CalibratorParameter.C:148
float get_outlier_threshold() const
Get the outlier threshold.
Definition CalibratorParameter.h:57
void prepare(const Archive *)
Prepare to plot.
Definition CalibratorParameter.C:85
unsigned get_class() const
Get the class index.
Definition CalibratorParameter.h:52
void set_managed(bool flag=true)
Data are managed externally (do not prepare)
Definition CalibratorParameter.h:38
std::string get_ylabel(const Archive *)
Get the default label for the y axis.
Definition CalibratorParameter.C:161
void set_outlier_threshold(float t)
Set the outlier threshold.
Definition CalibratorParameter.h:55
CalibratorParameter()
Default constructor.
Definition CalibratorParameter.C:65
TextInterface::Parser * get_interface()
Return the text interface.
Definition CalibratorParameter.C:187
Index get_subint() const
Get the sub-integration Idex.
Definition CalibratorParameter.h:62
static Calibrator::Info * get_Info(const Archive *, Index subint, float outlier_threshold)
Return the Calibrator::Info from the Archive.
Definition CalibratorParameter.C:27
void set_class(unsigned i)
Set the class index.
Definition CalibratorParameter.h:50
void set_subint(const Index &isub)
Set the sub-integration Idex.
Definition CalibratorParameter.h:60
Definition Calibrator.h:151
FrequencyPlot()
Default constructor.
Definition FrequencyPlot.C:9
Combines an index value and integrate flag.
Definition Index.h:19
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0