LinePhasePlot.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2007 by David Smith
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/LinePhasePlot.h
10
11
12
13#ifndef LINE_PHASE_PLOT_H_
14#define LINE_PHASE_PLOT_H_
15
16
17
18#include <Pulsar/Archive.h>
19#include <Pulsar/Profile.h>
20#include "Pulsar/PhasePlot.h"
21
22
23
24using std::pair;
25using std::vector;
26using Pulsar::Archive;
27using Pulsar::Profile;
29
30
31
32namespace Pulsar
33{
34
36 class LinePhasePlot : public PhasePlot
37 {
38 public:
40
42 void prepare (const Archive *data );
43
45 void draw( const Archive *data );
46
47 // Text interface for LinePhasePlot
48 class Interface : public TextInterface::To<LinePhasePlot>
49 {
50 public:
51 Interface( LinePhasePlot *s_instance = NULL );
52 };
53
56
58 int get_isub( void ) const { return srange.first; }
59
61 void set_isub( int s_isub ) { srange.first = srange.second = s_isub; }
62
64 pair<int,int> get_srange() const { return srange; }
65
67 void set_srange( const pair<int,int> &s_srange ) { srange = s_srange; }
68
70 int get_ipol( void ) const { return ipol; }
71
73 void set_ipol( int s_ipol ) { ipol = s_ipol; }
74
76 int get_ichan() const { return ichan; }
77
79 void set_ichan( const int &s_ichan ) { ichan = s_ichan; }
80
82 int get_line_colour() const { return line_colour; }
83
85 void set_line_colour( const int &s_line_colour ) { line_colour = s_line_colour; }
86
87 private:
88 // polarization to plot
89 int ipol;
90
91 // channel to plot
92 int ichan;
93
94 // range of subints to plot
95 pair<int,int> srange;
96
97 // The maximum different maxamp - minamp of all relevant subints
98 float amp_range;
99
100 // how much space(%) to add above and below the plot
101 float y_buffer_norm;
102
103 // The line colour
104 int line_colour;
105 };
106}
107
108
109#endif
110
LinePhasePlot()
Constructor Assume the subint, or range of subints are unset until we know how many there are Assume ...
Definition LinePhasePlot.C:37
The primary interface to pulsar observational data.
Definition Archive.h:46
int get_ichan() const
Get the frequency channel to plot.
Definition LinePhasePlot.h:76
void set_srange(const pair< int, int > &s_srange)
Set the range of subints to plot.
Definition LinePhasePlot.h:67
int get_ipol(void) const
Get the polarization to plot.
Definition LinePhasePlot.h:70
void set_ichan(const int &s_ichan)
Set the frequency channel to plot.
Definition LinePhasePlot.h:79
void set_isub(int s_isub)
Set the subint range to (x,x)
Definition LinePhasePlot.h:61
int get_line_colour() const
Get the line colour.
Definition LinePhasePlot.h:82
LinePhasePlot()
Constructor Assume the subint, or range of subints are unset until we know how many there are Assume ...
Definition LinePhasePlot.C:37
void prepare(const Archive *data)
prepare the archive for rendering
Definition LinePhasePlot.C:58
void set_ipol(int s_ipol)
Set the polarization to plot.
Definition LinePhasePlot.h:73
pair< int, int > get_srange() const
Get the range of subints to plot.
Definition LinePhasePlot.h:64
int get_isub(void) const
Get the first index of the subint range.
Definition LinePhasePlot.h:58
void draw(const Archive *data)
draw the archive
Definition LinePhasePlot.C:119
void set_line_colour(const int &s_line_colour)
Set the line colour.
Definition LinePhasePlot.h:85
TextInterface::Parser * get_interface()
Get a LinePhasePlot::Interface for this object.
Definition LinePhasePlot.C:158
Simple plots with pulse phase along the x-axis.
Definition PhasePlot.h:23
PhasePlot()
Default constructor.
Definition PhasePlot.C:11
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0