Simulation.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2004 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/Simulation.h
10 
11 #ifndef __Calibration_Simulation_H
12 #define __Calibration_Simulation_H
13 
14 #include "Pulsar/Instrument.h"
15 #include "Stokes.h"
16 
17 namespace Calibration {
18 
19  class Simulation : public Reference::Able {
20 
21  public:
22 
24  typedef enum { StokesI,
25  StokesQ,
26  StokesU,
27  StokesV,
28  StokesP,
29  StokesL,
30  Orientation,
31  Ellipticity
32  } Measurable;
33 
34 
36  static bool verbose;
37 
39  Simulation ();
40 
42  Instrument* get_instrument ();
43 
45 
48  Jones<double> get_response ();
49 
51  void set_cal_V (double cal_V);
52 
54  void set_cal_U (double cal_U);
55 
57  void set_input (Stokes<double>& stokes);
58 
60  void set_output (Stokes<double>& stokes);
61 
63  double get_distortion (Measurable m);
64 
65  double get_distortion (Measurable m,
66  Stokes<double>& in,
67  Stokes<double>& out);
68 
70  void single_axis_calibrate ();
71 
72  protected:
73 
75  Instrument instrument;
76 
78  double cal_U;
79 
81  double cal_V;
82 
84  Jones<double> response;
85 
87  Jones<double> inverse;
88 
90  bool response_changed;
91 
93  Stokes<double> input;
94 
96  Stokes<double> output;
97 
99  bool input_set;
100 
101  };
102 
103 }
104 
105 #endif
const ScalarMath exp(const ScalarMath &x)
Phenomenological description of the instrument.
Definition: Instrument.h:31
void solve(const std::vector< Estimate< double > > &output)
Solve for gain, boost, and rotation given output cal state.
Definition: SingleAxis.C:175
const ScalarMath sqrt(const ScalarMath &x)
Estimate< double > get_diff_phase() const
Get the differential phase, , in radians.
Definition: SingleAxis.C:96
Estimate< double > get_diff_gain() const
Get the differential gain, , in hyperbolic radians.
Definition: SingleAxis.C:90
Instrumental gain, differential gain, and differential phase.
Definition: SingleAxis.h:38
bool verbose
Definition: timer++.C:25
Vector< 3, T > get_vector() const
const ScalarMath atan2(const ScalarMath &y, const ScalarMath &x)

Generated using doxygen 1.8.17