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 "ColourBar.h"
16#include "ColourMap.h"
17
18namespace Pulsar {
19
20 class Profile;
21
23 class PhaseVsPlot : public PhasePlot {
24
25 public:
26
28 PhaseVsPlot ();
29
32
33 // Text interface to the PhaseVsPlot class
34 class Interface : public TextInterface::To<PhaseVsPlot> {
35 public:
36 Interface (PhaseVsPlot* = 0);
37 };
38
40 virtual const Profile* get_Profile (const Archive* data, unsigned row) = 0;
41
43 void preprocess (Archive*);
44
46 void draw (const Archive*);
47
49 PlotScale* get_z_scale () { return &z_scale; }
50
52 pgplot::ColourMap* get_colour_map () { return &colour_map; }
53
55 pgplot::ColourBar* get_colour_bar () { return &colour_bar; }
56
58 void set_style (const std::string&);
60 std::string get_style () const { return style; }
61
63 void set_line_colour( int new_colour ) { line_colour = new_colour; }
65 int get_line_colour( void ) { return line_colour; }
66
68 void set_crop( float s_crop_value ) { crop_value = s_crop_value; }
70 float get_crop() const { return crop_value; }
71
73 void set_rows( const std::pair<unsigned,unsigned>& rows );
75 std::pair<unsigned,unsigned> get_rows() const;
76
77 protected:
78
79 PlotScale z_scale;
80
81 pgplot::ColourMap colour_map;
82 pgplot::ColourBar colour_bar;
83
85 std::string style;
86
89
92
93 };
94
95}
96
97#endif
PhaseVsPlot()
Default constructor.
Definition PhaseVsPlot.C:26
The primary interface to pulsar observational data.
Definition Archive.h:46
PhasePlot()
Default constructor.
Definition PhasePlot.C:11
void draw(const Archive *)
Draw in the current viewport.
Definition PhaseVsPlot.C:81
pgplot::ColourMap * get_colour_map()
Provide access to the colour map.
Definition PhaseVsPlot.h:52
pgplot::ColourBar * get_colour_bar()
Provide access to the colour bar.
Definition PhaseVsPlot.h:55
PhaseVsPlot()
Default constructor.
Definition PhaseVsPlot.C:26
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition PhaseVsPlot.C:51
int get_line_colour(void)
Get the line colour.
Definition PhaseVsPlot.h:65
virtual const Profile * get_Profile(const Archive *data, unsigned row)=0
Derived classes must provide the Profile for the specified row.
std::pair< unsigned, unsigned > get_rows() const
Get the first and last row to plot.
Definition PhaseVsPlot.C:75
void preprocess(Archive *)
Remove the baseline from each sub-integration and channel independently.
Definition PhaseVsPlot.C:56
std::string get_style() const
Get the style.
Definition PhaseVsPlot.h:60
PlotScale * get_z_scale()
Provide access to the z-scale.
Definition PhaseVsPlot.h:49
void set_rows(const std::pair< unsigned, unsigned > &rows)
Set the first and last row to plot.
Definition PhaseVsPlot.C:70
float get_crop() const
Get the crop value.
Definition PhaseVsPlot.h:70
std::string style
The style in which the data will be plotted.
Definition PhaseVsPlot.h:85
int line_colour
The colour to draw the lines.
Definition PhaseVsPlot.h:88
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:63
void set_crop(float s_crop_value)
Set the crop value.
Definition PhaseVsPlot.h:68
void set_style(const std::string &)
Set the style.
Definition PhaseVsPlot.C:62
The scale on an axis.
Definition PlotScale.h:21
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Colour bar (wedge) manager.
Definition ColourBar.h:21
Colour map manager.
Definition ColourMap.h:21
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0