Instrument.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/Instrument.h
10 
11 #ifndef __CalibrationInstrument_H
12 #define __CalibrationInstrument_H
13 
14 #include "Pulsar/BackendFeed.h"
15 
16 #include "MEAL/ScalarParameter.h"
17 #include "MEAL/ChainRule.h"
18 
19 namespace Calibration {
20 
21  class Feed;
22 
24 
26  class Instrument : public BackendFeed {
27 
28  public:
29 
32 
34  Instrument (const Instrument& s);
35 
37  const Instrument& operator = (const Instrument& s);
38 
40  Instrument* clone () const;
41 
43  ~Instrument ();
44 
46  void equal_ellipticities ();
47 
50 
53 
55  bool has_equal_ellipticities () const { return ellipticities; }
56 
58  void equal_orientations ();
59  void independent_orientations ();
60 
62  void set_cyclic (bool flag = true);
63 
65  void set_constant_orientation (bool);
66 
68  Estimate<double> get_orientation (unsigned ireceptor) const;
69 
71  Estimate<double> get_ellipticity (unsigned ireceptor) const;
72 
74  unsigned get_ellipticity_index (unsigned receptor) const;
75 
77  void set_orientation (unsigned ireceptor, const Estimate<double>& theta);
78 
80  void set_ellipticity (unsigned ireceptor, const Estimate<double>& chi);
81 
83  const Feed* get_feed () const;
84  Feed* get_feed ();
85 
86  // ///////////////////////////////////////////////////////////////////
87  //
88  // Model implementation
89  //
90  // ///////////////////////////////////////////////////////////////////
91 
93  std::string get_name () const;
94 
95  protected:
96 
99 
102 
105 
108 
109  private:
110 
112  void init ();
113 
114  };
115 
116 }
117 
118 #endif
119 
void set_constant_orientation(bool)
Fix the orientation of the frontend.
Definition: Instrument.C:172
Phenomenological description of the instrument.
Definition: Instrument.h:31
Instrument * clone() const
Clone operator.
Definition: Instrument.C:55
Instrument()
Default Constructor.
Definition: Instrument.C:32
Reference::To< MEAL::ScalarParameter > ellipticities
ScalarParameter used to bind ellipticities.
Definition: Instrument.h:109
MEAL::ScalarParameter * get_ellipticities()
Return the single model parameter that constrains both ellipticities.
Definition: Instrument.h:57
Estimate< double > get_ellipticity(unsigned ireceptor) const
Get the ellipticity, , of the specified receptor in radians.
Definition: Instrument.C:82
void equal_ellipticities()
Model the ellipticities of both receptors using the same value.
Definition: Instrument.C:118
const Feed * get_feed() const
Provide access to the Feed model.
Definition: Instrument.C:177
Phenomenological description of the receiver feed.
Definition: Feed.h:32
void independent_ellipticities()
Model the ellipticities of the receptors using independent values.
Definition: Instrument.C:128
~Instrument()
Destructor.
Definition: Instrument.C:60
void set_orientation(unsigned ireceptor, const Estimate< double > &theta)
Set the orientation, , of the specified receptor in radians.
Definition: Instrument.C:99
void set_ellipticity(unsigned ireceptor, const Estimate< double > &chi)
Set the ellipticity, , of the specified receptor in radians.
Definition: Instrument.C:109
Reference::To< MEAL::ChainRule< MEAL::Complex2 > > feed_chain
ChainRule used to bind Feed parameters.
Definition: Instrument.h:106
void set_cyclic(bool flag=true)
Set cyclical limits on the model parameters.
Definition: Instrument.C:166
void set_model(T *model)
T get_value() const
void equal_orientations()
Model the orientations of both receptors using the same value.
Definition: Instrument.C:146
std::string get_name() const
Return the name of the class.
Definition: Instrument.C:67
const Instrument & operator=(const Instrument &s)
Assignment Operator.
Definition: Instrument.C:45
unsigned get_ellipticity_index(unsigned receptor) const
Get the index of the ellipticity parameter for the specified receptor.
Definition: Instrument.C:90
Estimate< double > get_orientation(unsigned ireceptor) const
Get the orientation, , of the specified receptor in radians.
Definition: Instrument.C:73
Reference::To< Feed > feed
Feed model: and .
Definition: Instrument.h:103
Reference::To< MEAL::ScalarParameter > orientations
ScalarParameter used to bind orientations.
Definition: Instrument.h:112
bool has_equal_ellipticities() const
Return true if both ellipticities are constrained by a single parameter.
Definition: Instrument.h:60

Generated using doxygen 1.8.17