StokesCrossCovariancePlot.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2016 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/StokesCrossCovariancePlot.h
10
11#ifndef __Pulsar_StokesCrossCovariancePlot_h
12#define __Pulsar_StokesCrossCovariancePlot_h
13
14#include "Pulsar/FluxPlot.h"
15#include "Matrix.h"
16
17namespace Pulsar {
18
20 class ProfileStats;
21
24
25 public:
26
29
32
33 // Text interface to the StokesCrossCovariancePlot class
34 class Interface : public TextInterface::To<StokesCrossCovariancePlot> {
35 public:
36 Interface (StokesCrossCovariancePlot* = 0);
37 };
38
40 void get_profiles (const Archive* data);
41
43 void set_covar (const std::pair<unsigned, unsigned>& c) { covar = c; }
45 std::pair<unsigned, unsigned> get_covar () const { return covar; }
46
48 void set_lags (unsigned s) { lags = s; }
50 unsigned get_lags () const { return lags; }
51
53 void set_bin (int s) { bin = s; }
55 int get_bin () const { return bin; }
56
58 void set_max_bin (bool s) { max_bin = s; }
60 bool get_max_bin () const { return max_bin; }
61
63 void set_expression (const std::string& str) { expression = str; }
65 std::string get_expression () const { return expression; }
66
68 void set_config (const std::string& str);
70 std::string get_config () const { return ""; }
71
73 void set_splot_output (bool s) { splot_output = s; }
75 bool get_splot_output () const { return splot_output; }
76
77 private:
78
79 unsigned lags;
80 int bin;
81 bool max_bin;
82 std::string expression;
83
84 // if (bin>-1 or max_bin), output text files for gnuplot splot
85 bool splot_output;
86
87 std::pair<unsigned, unsigned> covar;
88
90
91 // used to evaluate expressions on each row of cross-covariance matrix (at covar)
94
95 void plot_lags ();
96 void plot_bin ();
97 void plot_stats ();
98
99
100 };
101
102}
103
104#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
FluxPlot()
Default constructor.
Definition FluxPlot.C:27
Computes pulse profile statistics.
Definition ProfileStats.h:32
bool get_max_bin() const
Search for the phase bin to be plotted.
Definition StokesCrossCovariancePlot.h:60
unsigned get_lags() const
Get the lags to be plotted.
Definition StokesCrossCovariancePlot.h:50
std::pair< unsigned, unsigned > get_covar() const
Get the Stokes covariance indeces.
Definition StokesCrossCovariancePlot.h:45
void set_config(const std::string &str)
Configure the ProfileStats expression evaluator.
Definition StokesCrossCovariancePlot.C:43
int get_bin() const
Get the phase bin to be plotted.
Definition StokesCrossCovariancePlot.h:55
std::string get_config() const
Dummy function.
Definition StokesCrossCovariancePlot.h:70
void set_expression(const std::string &str)
Set the ProfileStats expression to evaluate.
Definition StokesCrossCovariancePlot.h:63
void set_splot_output(bool s)
Output text files for gnuplot splot.
Definition StokesCrossCovariancePlot.h:73
void set_lags(unsigned s)
Set the number of lags to be plotted.
Definition StokesCrossCovariancePlot.h:48
StokesCrossCovariancePlot()
Default constructor.
Definition StokesCrossCovariancePlot.C:26
void set_max_bin(bool s)
Search for the phase bin to be plotted.
Definition StokesCrossCovariancePlot.h:58
void set_bin(int s)
Set the phase bin to be plotted.
Definition StokesCrossCovariancePlot.h:53
void get_profiles(const Archive *data)
Load the profiles.
Definition StokesCrossCovariancePlot.C:48
void set_covar(const std::pair< unsigned, unsigned > &c)
Set the Stokes covariance indeces.
Definition StokesCrossCovariancePlot.h:43
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition StokesCrossCovariancePlot.C:38
bool get_splot_output() const
Output text files for gnuplot splot.
Definition StokesCrossCovariancePlot.h:75
std::string get_expression() const
Get the ProfileStats expression to evaluate.
Definition StokesCrossCovariancePlot.h:65
Cross-covariances between the Stokes parameters.
Definition StokesCrossCovariance.h:27
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0