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
16namespace 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
The primary interface to pulsar observational data.
Definition Archive.h:46
void init(const Archive *)
Initialize internal attributes according to Archive data.
Definition FrequencyScale.C:45
void get_ordinates(const Archive *, std::vector< float > &x_axis) const
Get the ordinate values.
Definition FrequencyScale.C:69
void get_indeces(const Archive *, unsigned &min, unsigned &max) const
Return the min and max as the phase bin index.
Definition FrequencyScale.C:59
bool reverse
Reverse the order on the axis.
Definition FrequencyScale.h:55
std::string get_label() const
Get a description of the units.
Definition FrequencyScale.C:64
FrequencyScale()
Default constructor.
Definition FrequencyScale.C:16
PlotScale()
Default constructor.
Definition PlotScale.C:20
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0