CalibratorType.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2009 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Classes/Pulsar/CalibratorType.h
10 
11 #ifndef __CalibratorType_H
12 #define __CalibratorType_H
13 
14 #include "Pulsar/Calibrator.h"
15 #include "Identifiable.h"
16 
17 namespace Pulsar
18 {
25  class Calibrator::Type : public Identifiable
26  {
27  public:
28 
30  static Type* factory (const std::string& name);
31 
33  static Type* factory (const Calibrator*);
34 
36  virtual std::string get_name () const { return get_identity(); }
37 
39  virtual unsigned get_nparam () const = 0;
40 
42  virtual Type* clone () const = 0;
43 
45  virtual bool is_a (const Type* that) const;
46 
48  template<class T>
49  bool is_a () const
50  {
51  return dynamic_cast<const T*> (this) != 0;
52  }
53 
55  class Interface;
56 
57  };
58 }
59 
60 #endif
Flux calibrator.
Definition: CalibratorTypes.h:34
van Straten (2004; ApJSS 152:129), equation 18
Definition: CalibratorTypes.h:155
Polarization and flux calibrators.
Definition: Calibrator.h:34
Britton (2000; ApJ 532:1240), equation 19, with isolated degeneracy.
Definition: CalibratorTypes.h:143
virtual unsigned get_nparam() const =0
Return the number of parameters that describe the transformation.
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
static Type * factory(const std::string &name)
Construct a new instance of Calibrator::Type, based on name.
Definition: CalibratorType.C:12
Ord, van Straten, Hotan & Bailes (2004; MNRAS 352:804), section 2.1.
Definition: CalibratorTypes.h:176
Definition: CalibratorType.h:30
virtual std::string get_name() const
Return the name of the calibrator type.
Definition: CalibratorType.h:46
virtual Type * clone() const =0
Return a new instance of derived type.
Unpublished polar decomposition.
Definition: CalibratorTypes.h:109
Defines the PSRCHIVE library.
Definition: CalSource.h:17
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