PhaseVsFrequencyPlus.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/PhaseVsFrequencyPlus.h
10 
11 #ifndef __Pulsar_PhaseVsFrequencyPlus_h
12 #define __Pulsar_PhaseVsFrequencyPlus_h
13 
14 #include "Pulsar/MultiPlot.h"
15 #include "Pulsar/PhaseVsFrequency.h"
16 #include "Pulsar/PhaseScale.h"
17 
18 #include "Pulsar/ProfilePlot.h"
19 #include "Pulsar/SpectrumPlot.h"
20 
21 namespace Pulsar {
22 
23  class PolnProfile;
24 
26  class PhaseVsFrequencyPlus : public MultiPlot {
27 
28  public:
29 
32 
35 
36  // Text interface to the PhaseVsFrequencyPlus class
37  class Interface : public TextInterface::To<PhaseVsFrequencyPlus> {
38  public:
39  Interface (PhaseVsFrequencyPlus* = 0);
40  };
41 
43  void prepare (const Archive*);
44 
46  void set_subint (const Index& _isubint) { isubint = _isubint; }
47  Index get_subint () const { return isubint; }
48 
50  void set_pol (const Index& _ipol) { ipol = _ipol; }
51  Index get_pol () const { return ipol; }
52 
54  void set_plot_psd (bool _plot);
55  bool get_plot_psd () const;
56 
57  PhaseVsFrequency* get_freq () { return &freq; }
58  ProfilePlot* get_flux () { return &flux; }
59  SpectrumPlot* get_psd () { return &psd; }
60 
61  PhaseScale* get_scale ();
62 
63  protected:
64 
65  PhaseVsFrequency freq;
66  ProfilePlot flux;
67  SpectrumPlot psd;
68 
69  Index isubint;
70  Index ipol;
71 
72  PhaseScale xaxis;
73  FrequencyScale yaxis;
74 
75  bool plot_psd;
76 
77  template<class T> void prepare (T* plot)
78  {
79  plot->set_subint (isubint);
80  plot->set_pol (ipol);
81  }
82 
83  };
84 
85 }
86 
87 #endif
void set_viewport(float x0, float x1, float y0, float y1)
Set the viewport (normalized device coordinates)
Definition: PlotFrame.C:256
bool get_plot_psd() const
Plot the power spectral density.
Definition: PhaseVsFrequencyPlus.C:123
void set_pol(const Index &_ipol)
Set the polarization to plot.
Definition: PhaseVsFrequencyPlus.h:55
PlotAxis * get_x_axis(bool allow_transpose)
Get the x-axis.
Definition: PlotFrame.C:204
Combines an index value and integrate flag.
Definition: Index.h:24
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: PhaseVsFrequencyPlus.C:85
void set_viewport(const std::pair< float, float > &f)
Set the viewport (normalized device coordinates)
Definition: PlotEdge.h:44
void set_left(const std::string &label)
Set the label to be drawn to the left of the frame.
Definition: PlotLabel.h:47
Plots phase vs. frequency, plus integrated profile and spectrum.
Definition: PhaseVsFrequencyPlus.h:31
PlotLabel * get_label_below()
Get the below-frame label.
Definition: PlotFrame.h:74
void plot(const Archive *)
Plot in the current viewport.
Definition: MultiPlot.C:43
void set_subint(const Index &_isubint)
Set the sub-integration to plot (where applicable)
Definition: PhaseVsFrequencyPlus.h:51
PlotAxis * get_y_axis(bool allow_transpose)
Get the y-axis.
Definition: PlotFrame.C:228
PlotScale * get_y_scale(bool allow_transpose)
Get the x-scale.
Definition: PlotFrame.C:213
The primary interface to pulsar observational data.
Definition: Archive.h:45
void rem_opt(char opt)
Remove from the options to be passed to pgbox for this axis.
Definition: PlotAxis.C:30
void set_chan(Index _ichan)
Set the frequency channel to plot (where applicable)
Definition: FluxPlot.h:78
void set_x_scale(PlotScale *scale)
Set the x-scale.
Definition: PlotFrame.C:198
PlotLabel * get_label_above()
Get the above-frame label.
Definition: PlotAttributes.h:59
virtual MultiFrame * get_frame()
Get the frame.
Definition: MultiPlot.h:64
Plots a single pulse profile.
Definition: ProfilePlot.h:26
PhaseScale * get_scale()
Get the scale.
Definition: PhaseVsFrequencyPlus.C:98
void set_alternate(bool f)
Set if the frame opposite the axis may have an alternate scale.
Definition: PlotAxis.h:55
void manage(Plot *)
Auto-manage a plot.
Definition: MultiPlot.C:130
void set_transpose(bool flag=true)
Transpose the x and y axes.
Definition: PlotFrame.h:79
PhaseVsFrequencyPlus()
Default constructor.
Definition: PhaseVsFrequencyPlus.C:13
Reperesents an axis with pulse phase ordinate.
Definition: PhaseScale.h:27
virtual PlotFrame * get_frame()
Get the frame.
Definition: FramedPlot.C:27
void set_label(const std::string &_label, bool overwrite)
Set the label to be drawn on the axis.
Definition: PlotAxis.C:37
void set_y_scale(PlotScale *scale)
Set the y-scale.
Definition: PlotFrame.C:222
Plots images of something as a function of pulse phase vs something.
Definition: PhaseVsFrequency.h:26
void add_opt(char opt)
Add to the options to be passed to pgbox for this axis.
Definition: PlotAxis.C:22
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_centre(const std::string &label)
Set the label to be drawn in the centre of the frame.
Definition: PlotLabel.h:52
void prepare(const Archive *)
Ensure that frames are properly initialized.
Definition: PhaseVsFrequencyPlus.C:90
void set_plot_psd(bool _plot)
Plot the power spectral density.
Definition: PhaseVsFrequencyPlus.C:104
MultiFrame frames
The plot frames.
Definition: MultiPlot.h:72
void set_all(const std::string &label)
Set all labels to the specified value.
Definition: PlotLabel.h:70

Generated using doxygen 1.8.17