DynamicSpectrumPlot.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_DynamicSpectrumPlot_h
10#define __Pulsar_DynamicSpectrumPlot_h
11
12#include "Pulsar/SimplePlot.h"
13#include "Pulsar/TimeScale.h"
14#include "Pulsar/FrequencyScale.h"
15#include "Pulsar/Index.h"
16
17#include "ColourMap.h"
18
19namespace Pulsar {
20
21 class Profile;
22
25
26 public:
27
30
33
34 // Text interface to the DynamicSpectrumPlot class
35 class Interface : public TextInterface::To<DynamicSpectrumPlot> {
36 public:
37 Interface (DynamicSpectrumPlot* = 0);
38 };
39
41 virtual void get_plot_array (const Archive *data, float *array) = 0;
42
44 void draw (const Archive*);
45
47 pgplot::ColourMap* get_colour_map () { return &colour_map; }
48
49 std::pair<unsigned,unsigned> get_subint_range (const Archive* data);
50 std::pair<unsigned,unsigned> get_chan_range (const Archive* data);
51
53 std::pair<int,int> get_srange() const;
54 void set_srange( const std::pair<int,int> &range );
55
57 void set_pol (const Index& _ipol) { ipol = _ipol; }
58 Index get_pol () const { return ipol; }
59
61 void set_method (int s_method) { method = s_method; }
62 int get_method() const { return method; }
63
65 TimeScale* get_x_scale () { return x_scale; }
66
68 FrequencyScale* get_y_scale () { return y_scale; }
69
70 protected:
71
72 pgplot::ColourMap colour_map;
73
74 Index ipol;
75 int method;
76
77 bool zero_check;
78
81 };
82
83}
84
85#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
void set_pol(const Index &_ipol)
Set the polarization to plot.
Definition DynamicSpectrumPlot.h:57
void set_method(int s_method)
Set a method.
Definition DynamicSpectrumPlot.h:61
TimeScale * get_x_scale()
Return pointer to x scale.
Definition DynamicSpectrumPlot.h:65
std::pair< int, int > get_srange() const
srange is the subint range
Definition DynamicSpectrumPlot.C:54
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition DynamicSpectrumPlot.C:48
pgplot::ColourMap * get_colour_map()
Provide access to the colour map.
Definition DynamicSpectrumPlot.h:47
virtual void get_plot_array(const Archive *data, float *array)=0
Derived classes must fill in the nsubint by nchan data array.
void draw(const Archive *)
Draw in the current viewport.
Definition DynamicSpectrumPlot.C:83
FrequencyScale * get_y_scale()
Return pointer to y scale.
Definition DynamicSpectrumPlot.h:68
DynamicSpectrumPlot()
Default constructor.
Definition DynamicSpectrumPlot.C:19
Represents an axis with radio frequency ordinate.
Definition FrequencyScale.h:21
Combines an index value and integrate flag.
Definition Index.h:19
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Plots a single plot.
Definition SimplePlot.h:33
Represents an axis with a time ordinate.
Definition TimeScale.h:21
Colour map manager.
Definition ColourMap.h:21
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0