PhaseVsHist.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_PhaseVsHist_h
10 #define __Pulsar_PhaseVsHist_h
11 
12 #include "Pulsar/PhaseVsPlot.h"
13 #include "Pulsar/Index.h"
14 
15 namespace Pulsar {
16 
18  class PhaseVsHist : public PhaseVsPlot {
19 
20  public:
21 
24 
27 
28  // Text interface to the PhaseVsTime class
29  class Interface : public TextInterface::To<PhaseVsHist> {
30  public:
31  Interface (PhaseVsHist* = 0);
32  };
33 
35  void prepare (const Archive* data);
36 
38  std::string get_ylabel (const Archive*);
39 
41  unsigned get_nrow (const Archive* data);
42 
44  const Profile* get_Profile (const Archive* data, unsigned row);
45 
47  void set_chan (const Index& _ichan) { ichan = _ichan; }
48  Index get_chan () const { return ichan; }
49 
50  void set_weight(const std::string _weight) { weight_scheme = _weight; }
51  std::string get_weight() const { return weight_scheme; }
52 
53  void set_kernel(const std::string _kernel) { hist_kernel = _kernel; }
54  std::string get_kernel() const { return hist_kernel; }
55 
56  protected:
57 
58  Index ichan;
59  double *histarray;
60  std::string weight_scheme;
61  std::string hist_kernel;
62 
63  };
64 
65 }
66 
67 #endif
void set_chan(const Index &_ichan)
Set the frequency channel to plot.
Definition: PhaseVsHist.h:57
std::string get_ylabel(const Archive *)
Get the default label for the y axis.
Definition: PhaseVsHist.C:156
Plots 2-D histograms of something vs pulse phase.
Definition: PhaseVsHist.h:23
const PolnProfile * get_Stokes(const Archive *data, Index subint, Index chan)
Return a new PolnProfile with state == Signal::Stokes.
Definition: Index.C:158
Combines an index value and integrate flag.
Definition: Index.h:24
PhaseVsHist()
Default constructor.
Definition: PhaseVsHist.C:24
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
void set_amps(const T *data)
set the amplitudes array equal to the contents of the data array
Definition: ProfileAmps.h:89
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
float get_weight(unsigned ichan) const
Get the Profile weight attribute of the given channel.
Definition: Integration.C:388
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
unsigned get_nrow(const Archive *data)
Derived classes must provide the number of rows.
Definition: PhaseVsHist.C:43
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: PhaseVsHist.C:38
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void set_weight(float)
set the weight of the profile
Definition: Profile.C:185
void prepare(const Archive *data)
Set the minimum and maximum values on the y-axis.
Definition: PhaseVsHist.C:48
virtual unsigned get_nbin() const =0
Get the number of pulsar phase bins used.
virtual void prepare(const Archive *)
Derived classes must prepare to draw.
Definition: FramedPlot.h:53
const Profile * get_Profile(const Archive *data, unsigned row)
Derived classes must provide the Profile for the specified row.
Definition: PhaseVsHist.C:162

Generated using doxygen 1.8.17