FrequencyScale.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/FrequencyScale.h
10 
11 #ifndef __Pulsar_FrequencyScale_h
12 #define __Pulsar_FrequencyScale_h
13 
14 #include "Pulsar/PlotScale.h"
15 
16 namespace Pulsar {
17 
18  class Archive;
19 
21  class FrequencyScale : public PlotScale {
22 
23  public:
24 
27 
28  // Text interface to the FrequencyScale class
29  class Interface : public TextInterface::To<FrequencyScale>
30  {
31  public:
32  Interface (FrequencyScale* = 0);
33  };
34 
35  TextInterface::Parser* get_interface () { return new Interface(this); }
36 
38  void init (const Archive*);
39 
41  void get_indeces (const Archive*, unsigned& min, unsigned& max) const;
42 
44  void get_ordinates (const Archive*, std::vector<float>& x_axis) const;
45 
47  std::string get_label () const;
48 
49  void set_reverse (bool flag=true) { reverse = flag; }
50  bool get_reverse () const { return reverse; }
51 
52  protected:
53 
55  bool reverse;
56 
57  };
58 
59 }
60 
61 #endif
void init(const Archive *)
Initialize internal attributes according to Archive data.
Definition: FrequencyScale.C:46
bool reverse
Reverse the order on the axis.
Definition: FrequencyScale.h:60
std::string get_label() const
Get a description of the units.
Definition: FrequencyScale.C:67
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
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
void get_ordinates(const Archive *, std::vector< float > &x_axis) const
Get the ordinate values.
Definition: FrequencyScale.C:72
FrequencyScale()
Default constructor.
Definition: FrequencyScale.C:16
virtual double get_bandwidth() const =0
Get the overall bandwidth of the observation.
void get_indeces(const Archive *, unsigned &min, unsigned &max) const
Return the min and max as the phase bin index.
Definition: FrequencyScale.C:61
Represents an axis with radio frequency ordinate.
Definition: FrequencyScale.h:26
Defines the PSRCHIVE library.
Definition: CalSource.h:17

Generated using doxygen 1.8.17