AnglePlot.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/AnglePlot.h
10
11#ifndef __Pulsar_AnglePlot_h
12#define __Pulsar_AnglePlot_h
13
14#include "Pulsar/PhasePlot.h"
15#include "Pulsar/Index.h"
16
17#include "Functor.h"
18#include "Estimate.h"
19
20namespace Pulsar {
21
23 class AnglePlot : public PhasePlot {
24
25 public:
26
27 enum Marker { ErrorTick=0x01, ErrorBar=0x02, Dot=0x04 };
28
30 AnglePlot ();
31
34
35 // Text interface to the AnglePlot class
36 class Interface : public TextInterface::To<AnglePlot> {
37 public:
38 Interface (AnglePlot* = 0);
39 };
40
42 virtual void get_angles (const Archive*) = 0;
43
45 void prepare (const Archive*);
46
48 void draw (const Archive*);
49
50 std::string get_flux_label (const Archive* data);
51
53 void set_subint (const Index& _isubint) { isubint = _isubint; }
54 Index get_subint () const { return isubint; }
55
57 void set_chan (const Index& _ichan) { ichan = _ichan; }
58 Index get_chan () const { return ichan; }
59
61 void set_marker (Marker m) { marker = m; }
62 Marker get_marker () const { return marker; }
63
65 void set_threshold (float t) { threshold = t; }
66 float get_threshold () const { return threshold; }
67
69 void set_span (float t) { span = t; }
70 float get_span () const { return span; }
71
72 Functor< float(float) > model;
73
74 const std::vector< Estimate<double> >& get_angles () const
75 { return angles; }
76
77 protected:
78
80 Marker marker;
81
83 float threshold;
84
86 float span;
87
89 std::vector< Estimate<double> > angles;
90
91 Index ichan;
92 Index isubint;
93 };
94
95 std::ostream& operator << (std::ostream& os, AnglePlot::Marker);
96 std::istream& operator >> (std::istream& is, AnglePlot::Marker&);
97
98}
99
100#endif
void prepare(const Archive *)
return the minimum and maximum value in degrees
Definition AnglePlot.C:37
void set_span(float t)
span of value in degrees
Definition AnglePlot.h:69
void set_marker(Marker m)
the mark to be used
Definition AnglePlot.h:61
void set_threshold(float t)
will draw only those points with linear > threshold * sigma
Definition AnglePlot.h:65
float threshold
Noise threshold.
Definition AnglePlot.h:83
AnglePlot()
Default constructor.
Definition AnglePlot.C:22
std::string get_flux_label(const Archive *data)
Return the label for the y-axis.
Definition AnglePlot.C:208
float span
Span of values in degrees.
Definition AnglePlot.h:86
void draw(const Archive *)
draw the angle as a function of pulse phase
Definition AnglePlot.C:95
virtual void get_angles(const Archive *)=0
Derived types compute the angles to be plotted.
std::vector< Estimate< double > > angles
The angles.
Definition AnglePlot.h:89
void set_chan(const Index &_ichan)
Set the frequency channel to plot (where applicable)
Definition AnglePlot.h:57
Marker marker
Marker used to plot each point.
Definition AnglePlot.h:80
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition AnglePlot.C:32
void set_subint(const Index &_isubint)
Set the sub-integration to plot (where applicable)
Definition AnglePlot.h:53
The primary interface to pulsar observational data.
Definition Archive.h:46
Combines an index value and integrate flag.
Definition Index.h:19
PhasePlot()
Default constructor.
Definition PhasePlot.C:11
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0