SpectrumPlot.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/SpectrumPlot.h
10
11#ifndef __Pulsar_SpectrumPlot_h
12#define __Pulsar_SpectrumPlot_h
13
14#include "Pulsar/PowerSpectra.h"
15#include "Pulsar/HasPen.h"
16
17namespace Pulsar {
18
19 class ArchiveStatistic;
20
22 class SpectrumPlot : public PowerSpectra, public HasPen
23 {
24
25 public:
26
27 // Default constructor
28 SpectrumPlot ();
29
30 // Destructor
31 ~SpectrumPlot ();
32
33 // Text interface to the SpectrumPlot class
34 class Interface : public TextInterface::To<SpectrumPlot> {
35 public:
36 Interface (SpectrumPlot* = 0);
37 };
38
41 { return new Interface (this); }
42
44 void get_spectra (const Archive* data);
45
47 void set_bin (const Index& _ibin) { ibin = _ibin; }
48 Index get_bin () const { return ibin; }
49
51 void set_expression (const std::string& str) { expression = str; }
52 std::string get_expression () const { return expression; }
53
55 void set_statistic (ArchiveStatistic*);
56
58 ArchiveStatistic* get_statistic () const;
59
61 void preprocess (Archive*);
62
63 protected:
64
65 Index ibin;
66 std::string expression;
68 };
69
70}
71
72#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
Commmon statistics that can be derived from an Archive.
Definition ArchiveStatistic.h:25
The primary interface to pulsar observational data.
Definition Archive.h:46
Interface to objects that have a PlotPen.
Definition HasPen.h:20
Combines an index value and integrate flag.
Definition Index.h:19
PowerSpectra()
Default constructor.
Definition PowerSpectra.C:24
void set_bin(const Index &_ibin)
Set the phase bin to plot.
Definition SpectrumPlot.h:47
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition SpectrumPlot.h:40
void set_expression(const std::string &str)
Set the ProfileStats expression to evaluate.
Definition SpectrumPlot.h:51
void preprocess(Archive *)
Disable baseline removal.
Definition SpectrumPlot.C:103
void set_statistic(ArchiveStatistic *)
Set the statistic.
Definition SpectrumPlot.C:29
ArchiveStatistic * get_statistic() const
Get the statistic.
Definition SpectrumPlot.C:36
void get_spectra(const Archive *data)
Load the spectra.
Definition SpectrumPlot.C:41
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0