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 
17 namespace 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 
56 
59 
61  void preprocess (Archive*);
62 
63  protected:
64 
65  Index ibin;
66  std::string expression;
68  };
69 
70 }
71 
72 #endif
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: SpectrumPlot.h:45
void set_expression(const std::string &str)
Set the ProfileStats expression to evaluate.
Definition: SpectrumPlot.h:56
Combines an index value and integrate flag.
Definition: Index.h:24
void set_statistic(ArchiveStatistic *)
Set the statistic.
Definition: SpectrumPlot.C:31
const Integration * get_Integration(const Archive *data, Index subint)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:118
The primary interface to pulsar observational data.
Definition: Archive.h:45
void set_bin(const Index &_ibin)
Set the phase bin to plot.
Definition: SpectrumPlot.h:52
Commmon statistics that can be derived from an Archive.
Definition: ArchiveStatistic.h:29
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
Spectral Kurtosis Staticstics calculated during observation.
Definition: SpectralKurtosis.h:25
Plots a single spectrum.
Definition: SpectrumPlot.h:27
ArchiveStatistic * get_statistic() const
Get the statistic.
Definition: SpectrumPlot.C:38
void get_spectra(const Archive *data)
Load the spectra.
Definition: SpectrumPlot.C:43
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
Computes pulse profile statistics.
Definition: ProfileStats.h:35
void preprocess(Archive *)
Disable baseline removal.
Definition: SpectrumPlot.C:103

Generated using doxygen 1.8.17