CalibratorTypes.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2009-2013 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Classes/Pulsar/CalibratorTypes.h
10 
11 #ifndef __CalibratorTypes_H
12 #define __CalibratorTypes_H
13 
14 #include "Pulsar/CalibratorType.h"
15 
16 // These preprocessor macros define the contructor and clone method for klass
17 #define CALIBRATOR_TYPE_INIT(klass,name) \
18  klass* clone () const { return new klass; } \
19  klass () { set_identity(name); }
20 
21 #define CALIBRATOR_TYPE(klass) \
22  klass* clone () const { return new klass; } \
23  klass () // body of constructor to follow
24 
25 namespace Pulsar
26 {
28 
31  namespace CalibratorTypes
32  {
35  {
36  public:
37  CALIBRATOR_TYPE_INIT(Flux,"flux")
38  unsigned get_nparam () const { return 4; }
39  };
40 
43  {
44  public:
45  CALIBRATOR_TYPE_INIT(Corrections,"corrections")
46  unsigned get_nparam () const { return 0; }
47  };
48 
51  {
52  };
53 
55  class SingleAxis : public Poln
56  {
57  public:
58  CALIBRATOR_TYPE(SingleAxis)
59  {
60  set_identity("single");
61  add_alias("SingleAxis");
62  }
63 
64  unsigned get_nparam () const { return 3; }
65  };
66 
68  class van02_EqA1 : public Poln
69  {
70  public:
71  CALIBRATOR_TYPE(van02_EqA1)
72  {
73  set_identity("van02eA1");
74  add_alias("Polar");
75  }
76  unsigned get_nparam () const { return 6; }
77  };
78 
80  class CompleteJones : public Poln
81  {
82  public:
83  bool is_a (const Type* that) const
84  { return dynamic_cast<const CompleteJones*>(that) != 0; }
85 
86  CALIBRATOR_TYPE_INIT(CompleteJones, "jones");
87 
88  unsigned get_nparam () const { return 7; }
89  };
90 
91 class ManualPoln : public Poln
92  {
93  public:
94  CALIBRATOR_TYPE_INIT(ManualPoln,"manualpoln");
95 
96  bool is_a (const Type* that) const { return Type::is_a (that); }
97  unsigned get_nparam () const { return 4; }
98  };
99 
101  class van04_Eq13 : public CompleteJones
102  {
103  public:
104  CALIBRATOR_TYPE_INIT(van04_Eq13, "van04e13");
105  bool is_a (const Type* that) const { return Type::is_a (that); }
106  };
107 
109  class van09_Eq : public CompleteJones
110  {
111  public:
112  CALIBRATOR_TYPE(van09_Eq)
113  {
114  set_identity ("van09");
115  add_alias ("Hamaker");
116  }
117  bool is_a (const Type* that) const { return Type::is_a (that); }
118  };
119 
121 
124  {
125  bool is_a (const Type* that) const
126  { return dynamic_cast<const Phenomenological*>(that) != 0; }
127  };
128 
131  {
132  public:
133  CALIBRATOR_TYPE(bri00_Eq19)
134  {
135  set_identity ("bri00e19");
136  add_alias ("Britton");
137  }
138 
139  bool is_a (const Type* that) const { return Type::is_a (that); }
140  };
141 
144  {
145  public:
146  CALIBRATOR_TYPE(bri00_Eq19_iso)
147  {
148  set_identity ("bri00e19iso");
149  }
150 
151  bool is_a (const Type* that) const { return Type::is_a (that); }
152  };
153 
156  {
157  public:
158  CALIBRATOR_TYPE_INIT(van04_Eq18,"van04e18")
159  bool is_a (const Type* that) const { return Type::is_a (that); }
160  };
161 
163  class Hybrid : public Poln
164  {
165  public:
166  CALIBRATOR_TYPE_INIT(Hybrid,"hybrid");
167 
168  bool is_a (const Type* that) const
169  { return dynamic_cast<const Hybrid*>(that) != 0; }
170 
171  // 7 Phenomenological + 3 SingleAxis
172  unsigned get_nparam () const { return 10; }
173  };
174 
176  class ovhb04 : public Hybrid
177  {
178  public:
179  CALIBRATOR_TYPE_INIT(ovhb04,"ovhb04")
180  bool is_a (const Type* that) const { return Type::is_a (that); }
181  };
182 
184  class Nefarious : public Poln
185  {
186  public:
187  unsigned get_nparam () const { return 0; }
188  };
189 
191  class DoP : public Nefarious
192  {
193  public:
194  CALIBRATOR_TYPE_INIT(DoP,"dop")
195  };
196 
198  class OffPulse: public Nefarious
199  {
200  public:
201  CALIBRATOR_TYPE_INIT(OffPulse,"off")
202  };
203  }
204 }
205 
206 #endif
Flux calibrator.
Definition: CalibratorTypes.h:34
Off-pulse Calibrator (P236)
Definition: CalibratorTypes.h:198
van Straten (2004; ApJSS 152:129), equation 18
Definition: CalibratorTypes.h:155
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:172
Britton (2000; ApJ 532:1240), equation 19, with isolated degeneracy.
Definition: CalibratorTypes.h:143
Full 7 degrees of freedom parameterization of Jones matrix.
Definition: CalibratorTypes.h:80
Mixes a SingleAxis and Phenomenological parameterization.
Definition: CalibratorTypes.h:163
van Straten (2004; ApJSS 152:129), equation 13
Definition: CalibratorTypes.h:101
Gain, differential gain and differential phase.
Definition: CalibratorTypes.h:55
bool is_a() const
Return true if this is a T.
Definition: CalibratorType.h:59
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:46
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:76
Polarization calibrator.
Definition: CalibratorTypes.h:50
Calibrate by brute force and unjustified assumptions.
Definition: CalibratorTypes.h:184
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:88
Ord, van Straten, Hotan & Bailes (2004; MNRAS 352:804), section 2.1.
Definition: CalibratorTypes.h:176
Definition: CalibratorType.h:30
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:64
Unpublished polar decomposition.
Definition: CalibratorTypes.h:109
Phenomenological parameterizations of Jones matrix.
Definition: CalibratorTypes.h:123
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:187
unsigned get_nparam() const
Return the number of parameters that describe the transformation.
Definition: CalibratorTypes.h:38
Degree of Polarization Calibrator (P236)
Definition: CalibratorTypes.h:191
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Corrections.
Definition: CalibratorTypes.h:42
Britton (2000; ApJ 532:1240), equation 19.
Definition: CalibratorTypes.h:130
van Straten (2002; ApJ 568:436), equation A1
Definition: CalibratorTypes.h:68

Generated using doxygen 1.8.17