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 
20 namespace Pulsar {
21 
23  class CalibratorParameter : public FrequencyPlot
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
static Calibrator::Info * get_Info(const Archive *, Index subint, float outlier_threshold)
Return the Calibrator::Info from the Archive.
Definition: CalibratorParameter.C:27
Combines an index value and integrate flag.
Definition: Index.h:24
void draw(const Archive *)
Draw the spectra.
Definition: CalibratorParameter.C:148
void set_subint(const Index &isub)
Set the sub-integration Idex.
Definition: CalibratorParameter.h:70
void set_class(unsigned i)
Set the class index.
Definition: CalibratorParameter.h:60
CalibratorParameter()
Default constructor.
Definition: CalibratorParameter.C:65
TextInterface::Parser * get_interface()
Return the text interface.
Definition: CalibratorParameter.C:188
The primary interface to pulsar observational data.
Definition: Archive.h:45
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
Index get_subint() const
Get the sub-integration Idex.
Definition: CalibratorParameter.h:72
Definition: Calibrator.h:152
void set_outlier_threshold(float f)
Set the threshold used to reject outliers when computing levels.
Definition: ReferenceCalibrator.h:64
void set_managed(bool flag=true)
Data are managed externally (do not prepare)
Definition: CalibratorParameter.h:48
Stores PolnCalibrator parameters in an Archive instance.
Definition: PolnCalibratorExtension.h:28
Calibrators derived from reference source observations.
Definition: ReferenceCalibrator.h:31
float get_outlier_threshold() const
Get the outlier threshold.
Definition: CalibratorParameter.h:67
void set_subint(const Index &isub)
Set the sub-integration index.
Definition: PolnCalibrator.C:146
std::string get_ylabel(const Archive *)
Get the default label for the y axis.
Definition: CalibratorParameter.C:161
virtual double get_bandwidth() const =0
Get the overall bandwidth of the observation.
Flux Calibrator Extension.
Definition: FluxCalibratorExtension.h:28
unsigned get_class() const
Get the class index.
Definition: CalibratorParameter.h:62
Polarimetric calibrators.
Definition: PolnCalibrator.h:41
Plots a single class of model parameters from Calibrator::Info.
Definition: CalibratorParameter.h:28
Calibrates flux using standard candles and artificial sources.
Definition: FluxCalibrator.h:29
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Represents the system as a Calibration::SingleAxis.
Definition: SingleAxisCalibrator.h:26
void prepare(const Archive *)
Prepare to plot.
Definition: CalibratorParameter.C:85
void set_outlier_threshold(float t)
Set the outlier threshold.
Definition: CalibratorParameter.h:65

Generated using doxygen 1.8.17