CalibratorSpectrum.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 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_CalibratorSpectrum_h
12 #define __Pulsar_CalibratorSpectrum_h
13 
14 #include "Pulsar/FrequencyPlot.h"
15 #include "Pulsar/Index.h"
16 #include "EstimatePlotter.h"
17 
18 namespace Pulsar {
19 
20  class Profile;
21 
23  class CalibratorSpectrum : public FrequencyPlot {
24 
25  public:
26 
29 
32 
33  // Text interface to the CalibratorSpectrum class
34  class Interface : public TextInterface::To<CalibratorSpectrum> {
35  public:
36  Interface (CalibratorSpectrum* = 0);
37  };
38 
40  std::string get_ylabel (const Archive*);
41 
43  void set_subint (const Index& _isubint) { isubint = _isubint; }
44  Index get_subint () const { return isubint; }
45 
47  void set_plot_Ip (bool flag = true) { plot_Ip = flag; }
48  bool get_plot_Ip () const { return plot_Ip; }
49 
51  void set_plot_total (bool flag = true) { plot_total = flag; }
52  bool get_plot_total () const { return plot_total; }
53 
55  void set_plot_low (bool flag = true) { plot_low = flag; }
56  bool get_plot_low () const { return plot_low; }
57 
59  void set_norm_inv (bool flag = true) { norm_inv = flag; }
60  bool get_norm_inv () const { return norm_inv; }
61 
63  void set_outlier_threshold (float f) { outlier_threshold = f; }
64  float get_outlier_threshold () const { return outlier_threshold; }
65 
67  void prepare (const Archive*);
68 
70  void draw (const Archive*);
71 
72  protected:
73 
74  Index isubint;
75  bool plot_total;
76  bool plot_low;
77  bool plot_Ip;
78  bool norm_inv;
79 
81  double outlier_threshold;
82 
83  EstimatePlotter plotter;
84 
85  };
86 
87 }
88 
89 #endif
void set_plot_low(bool flag=true)
Plot the off-pulse polarization.
Definition: CalibratorSpectrum.h:60
virtual unsigned get_npol() const =0
Get the number of polarizations.
Combines an index value and integrate flag.
Definition: Index.h:24
void draw(const Archive *)
Draw the spectra.
Definition: CalibratorSpectrum.C:131
void set_plot_Ip(bool flag=true)
Plot the total and polarized intensities.
Definition: CalibratorSpectrum.h:52
const Integration * get_Integration(const Archive *data, Index subint)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:118
void set_outlier_threshold(float f)
Set the threshold used to reject outliers when computing levels.
Definition: CalibratorSpectrum.h:68
The primary interface to pulsar observational data.
Definition: Archive.h:45
TextInterface::Parser * get_interface()
Return the text interface.
Definition: CalibratorSpectrum.C:36
void set_norm_inv(bool flag=true)
Normalize the Stokes paramters by the invariance.
Definition: CalibratorSpectrum.h:64
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
virtual Signal::State get_state() const =0
Get the state of the profile data.
Plots flux profiles.
Definition: CalibratorSpectrum.h:28
std::string get_ylabel(const Archive *)
Get the default label for the y axis.
Definition: CalibratorSpectrum.C:147
CalibratorSpectrum()
Default constructor.
Definition: CalibratorSpectrum.C:19
double outlier_threshold
Threshold used to reject outliers when computing levels.
Definition: CalibratorSpectrum.h:86
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_subint(const Index &_isubint)
Set the sub-integration to plot (where applicable)
Definition: CalibratorSpectrum.h:48
void prepare(const Archive *)
Prepare to plot.
Definition: CalibratorSpectrum.C:52
void set_plot_total(bool flag=true)
Plot the sum of on- and off-pulse polarization.
Definition: CalibratorSpectrum.h:56

Generated using doxygen 1.8.17