PositionAngles.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/MEAL/MEAL/PositionAngles.h
10 
11 #ifndef __PositionAngles_H
12 #define __PositionAngles_H
13 
14 #include "MEAL/Scalar.h"
15 #include "MEAL/Value.h"
16 #include "MEAL/VectorRule.h"
17 
18 namespace MEAL {
19 
20  class ScalarParameter;
21 
23 
26  class PositionAngles : public Scalar
27  {
28 
29  public:
30 
32  PositionAngles ();
33 
36 
39 
41  ~PositionAngles ();
42 
44  unsigned size () const;
45 
47  void set_index (unsigned index);
48 
50  unsigned get_index () const;
51 
53  void push_back (const Estimate<double>& pa);
54 
56  void set_frequency (double frequency);
57 
59  double get_frequency () const;
60 
62  void set_position_angle (unsigned index, const Estimate<double>& pa);
63 
65  Estimate<double> get_position_angle (unsigned index) const;
66 
68  void set_rotation_measure (const Estimate<double>& rotation_measure);
69 
71  Estimate<double> get_rotation_measure () const;
72 
73  // ///////////////////////////////////////////////////////////////////
74  //
75  // Function implementation
76  //
77  // ///////////////////////////////////////////////////////////////////
78 
80  std::string get_name () const;
81 
82  private:
83 
85  std::vector<ScalarParameter*> position_angle;
86 
88  ScalarParameter* rotation_measure;
89 
91  Value<Scalar>* frequency;
92 
94  Reference::To<Scalar> delta_pa;
95 
97  VectorRule<Scalar> pa;
98 
99  void calculate (double&, std::vector<double>*) {}
100  void init ();
101 
102  };
103 
104 }
105 
106 #endif
Scalar * get_expression() const
Access the expression.
Definition: ScalarMath.h:70
Estimate< double > get_rotation_measure() const
Get the rotation measure.
Definition: PositionAngles.C:99
std::string get_name() const
Return the name of the class.
Definition: PositionAngles.C:115
Represents a scalar parameter, .
Definition: ScalarParameter.h:24
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void set_position_angle(unsigned index, const Estimate< double > &pa)
Set the position angle at infinite frequency.
Definition: PositionAngles.C:79
Convenience interface to building expressions from elements.
Definition: ScalarMath.h:24
Estimate< double > get_position_angle(unsigned index) const
Get the position angle at infinite frequency.
Definition: PositionAngles.C:87
PositionAngles()
Default constructor.
Definition: PositionAngles.C:28
PositionAngles & operator=(const PositionAngles &copy)
Assignment operator.
Definition: PositionAngles.C:42
void set_frequency(double frequency)
Set the radio frequency in MHz.
Definition: PositionAngles.C:104
unsigned get_index() const
Get the index of the position angle array.
Definition: PositionAngles.C:66
unsigned size() const
Get the size of the position angle array.
Definition: PositionAngles.C:54
Function returns position angle(s) as a function of frequency.
Definition: PositionAngles.h:31
void set_rotation_measure(const Estimate< double > &rotation_measure)
Set the rotation measure.
Definition: PositionAngles.C:93
virtual void copy(const Function *model)
Does the work for operator =.
Definition: Function.C:58
void copy_parameter_policy(const Function *)
Copy the parameter policy of another instance.
Definition: Function.C:91
double get_frequency() const
Get the radio frequency in MHz.
Definition: PositionAngles.C:109
~PositionAngles()
Destructor.
Definition: PositionAngles.C:49
void set_index(unsigned index)
Set the index of the position angle array.
Definition: PositionAngles.C:60
void push_back(const Estimate< double > &pa)
Add to the position angle array.
Definition: PositionAngles.C:71

Generated using doxygen 1.8.17