PhaseVsPlot.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/PhaseVsPlot.h
10 
11 #ifndef __Pulsar_PhaseVsPlot_h
12 #define __Pulsar_PhaseVsPlot_h
13 
14 #include "Pulsar/PhasePlot.h"
15 #include "ColourMap.h"
16 
17 namespace Pulsar {
18 
19  class Profile;
20 
22  class PhaseVsPlot : public PhasePlot {
23 
24  public:
25 
28 
31 
32  // Text interface to the PhaseVsPlot class
33  class Interface : public TextInterface::To<PhaseVsPlot> {
34  public:
35  Interface (PhaseVsPlot* = 0);
36  };
37 
39  virtual const Profile* get_Profile (const Archive* data, unsigned row) = 0;
40 
42  void preprocess (Archive*);
43 
45  void draw (const Archive*);
46 
48  PlotScale* get_z_scale () { return &z_scale; }
49 
51  pgplot::ColourMap* get_colour_map () { return &colour_map; }
52 
54  void set_style (const std::string&);
56  std::string get_style () const { return style; }
57 
59  void set_line_colour( int new_colour ) { line_colour = new_colour; }
61  int get_line_colour( void ) { return line_colour; }
62 
64  void set_crop( float s_crop_value ) { crop_value = s_crop_value; }
66  float get_crop() const { return crop_value; }
67 
69  void set_rows( const std::pair<unsigned,unsigned>& rows );
71  std::pair<unsigned,unsigned> get_rows() const;
72 
73  protected:
74 
75  PlotScale z_scale;
76 
77  pgplot::ColourMap colour_map;
78 
80  std::string style;
81 
83  int line_colour;
84 
86  float crop_value;
87 
88  };
89 
90 }
91 
92 #endif
virtual const Profile * get_Profile(const Archive *data, unsigned row)=0
Derived classes must provide the Profile for the specified row.
void preprocess(Archive *)
Remove the baseline from each sub-integration and channel independently.
Definition: PhaseVsPlot.C:56
std::pair< unsigned, unsigned > get_rows() const
Get the first and last row to plot.
Definition: PhaseVsPlot.C:75
int get_line_colour(void)
Get the line colour.
Definition: PhaseVsPlot.h:66
std::string get_style() const
Get the style.
Definition: PhaseVsPlot.h:61
void set_crop(float s_crop_value)
Set the crop value.
Definition: PhaseVsPlot.h:69
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
pgplot::ColourMap * get_colour_map()
Provide access to the colour map.
Definition: PhaseVsPlot.h:56
The scale on an axis.
Definition: PlotScale.h:26
PlotScale * get_z_scale()
Provide access to the z-scale.
Definition: PhaseVsPlot.h:53
void set_rows(const std::pair< unsigned, unsigned > &rows)
Set the first and last row to plot.
Definition: PhaseVsPlot.C:70
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: PhaseVsPlot.C:51
int line_colour
The colour to draw the lines.
Definition: PhaseVsPlot.h:88
Find the baseline from each total intensity profile.
Definition: RemoveBaseline.h:85
void set_style(const std::string &)
Set the style.
Definition: PhaseVsPlot.C:62
float crop_value
The percentage of max to crop at.
Definition: PhaseVsPlot.h:91
void set_line_colour(int new_colour)
Set the line colour.
Definition: PhaseVsPlot.h:64
Convenience interface to a bunch of regularly used colour maps.
Definition: ColourMap.h:26
Plots images of something as a function of pulse phase vs something.
Definition: PhaseVsPlot.h:27
void draw(const Archive *)
Draw in the current viewport.
Definition: PhaseVsPlot.C:81
std::string style
The style in which the data will be plotted.
Definition: PhaseVsPlot.h:85
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
PhaseVsPlot()
Default constructor.
Definition: PhaseVsPlot.C:26
virtual unsigned get_nbin() const =0
Get the number of pulsar phase bins used.
Name
Available colour map names.
Definition: ColourMap.h:35
float get_crop() const
Get the crop value.
Definition: PhaseVsPlot.h:71
Stores the properties of the plot frame.
Definition: PlotFrame.h:31

Generated using doxygen 1.8.17