General/Pulsar/SimPolnTiming.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2005 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/SimPolnTiming.h
10
11#ifndef __Pulsar_SimPolnTiming_h
12#define __Pulsar_SimPolnTiming_h
13
14#include "Pulsar/SyntheticPolnProfile.h"
15#include "Pulsar/PolnProfileFit.h"
16#include "MEAL/RotatingVectorModel.h"
17#include "MEAL/Gaussian.h"
18
19#include <iostream>
20
21namespace Pulsar {
22
23 class Archive;
24
25 class Range {
26 public:
28 Range (unsigned steps, double min, double max);
29
30 unsigned steps;
31 double min, max;
32 unsigned start, stop;
33
35 double get_value (unsigned current);
36
38 void parse (const std::string& txt);
39 };
40
41 std::ostream& operator<< (std::ostream& ostr, const Range& r);
42
45
46 public:
47
50
53
56
59
62
65
67 unsigned nbin;
68
70 void set_centre (double);
71
74
76 float rvm_beta;
77
79 void set_standard (Archive*);
80
82 unsigned iterations;
83
86
88 float offset;
89
92
94 Range slope;
95 double poln_slope;
96
98 Range width;
99 double pulse_width;
100
102 Range dgain;
103 double diff_gain;
104
107 double parallactic_angle;
108
111 double B_orientation;
112 double B_ellipticity;
113 double beta;
114
116 void run_simulation ();
117
119 std::string title;
120
123
125 std::ostream* output;
126
127 bool logarithmic;
128 void extrapolate_benefit (unsigned steps);
129 void susceptibility ();
130
132 void boost_around ();
133
134 protected:
135
136 class Result {
137 public:
138 Estimate<double> I_est_mean;
139 Estimate<double> S_est_mean;
140 Estimate<double> I_mean;
141 Estimate<double> S_mean;
142 Estimate<double> I_err;
143 Estimate<double> S_err;
144 };
145
147 void one_loop (unsigned level);
148
150 Result one_step ();
151
154
155 };
156
157}
158
159#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
The matrix template matching algorithm.
Definition PolnProfileFit.h:51
void susceptibility()
Account for noise in the standard profile.
Definition SimPolnTiming.C:278
SyntheticPolnProfile generate
The synthetic polarimetric profile generator.
Definition General/Pulsar/SimPolnTiming.h:55
void set_standard(Archive *)
Set the archive to be used as a standard.
Definition SimPolnTiming.C:158
void boost_around()
Find the phase shift due to boosts of varying orientation.
Definition SimPolnTiming.C:340
~SimPolnTiming()
Destructor.
Definition SimPolnTiming.C:146
Range parallactic
Number of steps when varying the parallactic angle.
Definition General/Pulsar/SimPolnTiming.h:106
Result one_step()
One step in the simulation.
Definition SimPolnTiming.C:520
float standard_noise
Relative noise in standard profile.
Definition General/Pulsar/SimPolnTiming.h:73
bool vary_line_of_sight
Vary the line of sight.
Definition General/Pulsar/SimPolnTiming.h:91
Reference::To< Pulsar::Archive > archive
The data to use as a standard.
Definition General/Pulsar/SimPolnTiming.h:153
void run_simulation()
Run the simulation, outputting results to cout.
Definition SimPolnTiming.C:182
MEAL::RotatingVectorModel rvm
The rotating vector model used to describe the position angle.
Definition General/Pulsar/SimPolnTiming.h:64
unsigned nbin
Number of bins in pulse profile.
Definition General/Pulsar/SimPolnTiming.h:67
std::ostream * output
Output stream.
Definition General/Pulsar/SimPolnTiming.h:125
SimPolnTiming()
Default constructor.
Definition SimPolnTiming.C:93
float offset
Phase offset of simulated observations.
Definition General/Pulsar/SimPolnTiming.h:88
bool as_Estimate
Output values using Estimate operator <<.
Definition General/Pulsar/SimPolnTiming.h:122
Range width
Number of steps when varying the Gaussian width.
Definition General/Pulsar/SimPolnTiming.h:98
float rvm_beta
Difference between magnetic axis and line of sight.
Definition General/Pulsar/SimPolnTiming.h:76
unsigned iterations
Number of simulated observations for each step in simulation.
Definition General/Pulsar/SimPolnTiming.h:82
Range boost_vector
Number of steps when varying the parallactic angle.
Definition General/Pulsar/SimPolnTiming.h:110
PolnProfileFit fit
The arrival time estimation algorithm.
Definition General/Pulsar/SimPolnTiming.h:58
Range dgain
Number of steps when varying the differental gain.
Definition General/Pulsar/SimPolnTiming.h:102
MEAL::Gaussian gaussian
The gaussian total intensity profile.
Definition General/Pulsar/SimPolnTiming.h:61
void set_centre(double)
Set the phase of the standard profile centre.
Definition SimPolnTiming.C:151
std::string title
Title written over plot.
Definition General/Pulsar/SimPolnTiming.h:119
void extrapolate_benefit(unsigned steps)
Account for noise in the standard profile.
Definition SimPolnTiming.C:410
Range slope
Number of steps when varying the RVM orientation.
Definition General/Pulsar/SimPolnTiming.h:94
float measurement_noise
Relative noise in simulated observations.
Definition General/Pulsar/SimPolnTiming.h:85
void one_loop(unsigned level)
One loop in the simulation.
Definition SimPolnTiming.C:188
Simulated polarimetric pulse profile.
Definition General/Pulsar/SyntheticPolnProfile.h:23
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0