PhaseVsHistPlus.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2009 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __Pulsar_PhaseVsHistPlus_h
10 #define __Pulsar_PhaseVsHistPlus_h
11 
12 #include "Pulsar/MultiPlot.h"
13 #include "Pulsar/PhaseScale.h"
14 #include "Pulsar/PhaseVsHist.h"
15 #include "Pulsar/StokesPlot.h"
16 
17 namespace Pulsar {
18 
19  class PolnProfile;
20 
22  class PhaseVsHistPlus : public MultiPlot {
23 
24  public:
25 
28 
31 
32  // Text interface to the PhaseVsFrequencyPlus class
33  class Interface : public TextInterface::To<PhaseVsHistPlus> {
34  public:
35  Interface (PhaseVsHistPlus* = 0);
36  };
37 
39  void prepare (const Archive*);
40 
42  void set_subint (const Index& _isubint) { isubint = _isubint; }
43  Index get_subint () const { return isubint; }
44 
45  PhaseVsHist* get_hist () { return &hist; }
46  StokesPlot* get_flux () { return &flux; }
47 
49 
50  protected:
51 
52  PhaseVsHist hist;
53  StokesPlot flux;
54 
55  Index isubint;
56 
57  PhaseScale xaxis;
58  //FrequencyScale yaxis;
59 
60 #if 0
61  template<class T> void prepare (T* plot)
62  {
63  plot->set_subint (isubint);
64  }
65 #endif
66 
67  };
68 
69 }
70 
71 #endif
void set_plot_colours(const std::string &plot)
Set the colour for each value plotted.
Definition: StokesPlot.h:53
void set_subint(const Index &_isubint)
Set the sub-integration to plot (where applicable)
Definition: PhaseVsHistPlus.h:47
void set_viewport(float x0, float x1, float y0, float y1)
Set the viewport (normalized device coordinates)
Definition: PlotFrame.C:256
Plots 2-D histograms of something vs pulse phase.
Definition: PhaseVsHist.h:23
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
void set_left(const std::string &label)
Set the label to be drawn to the left of the frame.
Definition: PlotLabel.h:47
void plot(const Archive *)
Plot in the current viewport.
Definition: MultiPlot.C:43
PlotAxis * get_y_axis(bool allow_transpose)
Get the y-axis.
Definition: PlotFrame.C:228
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
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: PhaseVsHistPlus.C:66
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
void set_subint(Index _isubint)
Set the sub-integration to plot (where applicable)
Definition: FluxPlot.h:74
virtual MultiFrame * get_frame()
Get the frame.
Definition: MultiPlot.h:64
Plots a polarization pulse profile.
Definition: StokesPlot.h:24
void set_alternate(bool f)
Set if the frame opposite the axis may have an alternate scale.
Definition: PlotAxis.h:55
void prepare(const Archive *)
Ensure that frames are properly initialized.
Definition: PhaseVsHistPlus.C:71
void set_plot_lines(const std::string &plot)
Set the line style for each value plotted.
Definition: StokesPlot.h:57
PhaseScale * get_scale()
Get the scale.
Definition: PhaseVsHistPlus.C:76
void manage(Plot *)
Auto-manage a plot.
Definition: MultiPlot.C:130
PhaseVsHistPlus()
Default constructor.
Definition: PhaseVsHistPlus.C:13
Reperesents an axis with pulse phase ordinate.
Definition: PhaseScale.h:27
virtual PlotFrame * get_frame()
Get the frame.
Definition: FramedPlot.C:27
Plots phase vs. frequency, plus integrated profile and spectrum.
Definition: PhaseVsHistPlus.h:27
void set_plot_values(const std::string &plot)
Set the values to be plotted (one or more of I,Q,U,V,L,p)
Definition: StokesPlot.h:49
void set_label(const std::string &_label, bool overwrite)
Set the label to be drawn on the axis.
Definition: PlotAxis.C:37
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
MultiFrame frames
The plot frames.
Definition: MultiPlot.h:72

Generated using doxygen 1.8.17