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 
19 namespace Pulsar {
20 
21  class Profile;
22 
24  class DynamicSpectrumPlot : public SimplePlot {
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
virtual void get_plot_array(const Archive *data, float *array)=0
Derived classes must fill in the nsubint by nchan data array.
std::pair< int, int > get_srange() const
srange is the subint range
Definition: DynamicSpectrumPlot.C:54
Combines an index value and integrate flag.
Definition: Index.h:24
FrequencyScale * get_y_scale()
Return pointer to y scale.
Definition: DynamicSpectrumPlot.h:73
Base class for image plots of something vs time and frequency.
Definition: DynamicSpectrumPlot.h:29
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
The primary interface to pulsar observational data.
Definition: Archive.h:45
pgplot::ColourMap * get_colour_map()
Provide access to the colour map.
Definition: DynamicSpectrumPlot.h:52
DynamicSpectrumPlot()
Default constructor.
Definition: DynamicSpectrumPlot.C:19
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
void set_method(int s_method)
Set a method.
Definition: DynamicSpectrumPlot.h:66
Represents an axis with a time ordinate.
Definition: TimeScale.h:26
Represents an axis with radio frequency ordinate.
Definition: FrequencyScale.h:26
Convenience interface to a bunch of regularly used colour maps.
Definition: ColourMap.h:26
TimeScale * get_x_scale()
Return pointer to x scale.
Definition: DynamicSpectrumPlot.h:70
void set_pol(const Index &_ipol)
Set the polarization to plot.
Definition: DynamicSpectrumPlot.h:62
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Name
Available colour map names.
Definition: ColourMap.h:35
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: DynamicSpectrumPlot.C:48
Stores the properties of the plot frame.
Definition: PlotFrame.h:31
void draw(const Archive *)
Draw in the current viewport.
Definition: DynamicSpectrumPlot.C:83

Generated using doxygen 1.8.17