Rotation1.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/MEAL/MEAL/Rotation1.h
10 
11 #ifndef __MEAL_Rotation1_H
12 #define __MEAL_Rotation1_H
13 
14 #include "MEAL/Complex2.h"
15 #include "Vector.h"
16 
17 namespace MEAL {
18 
19  class OneParameter;
20 
22 
30  class Rotation1 : public Complex2
31  {
32 
33  public:
34 
36  Rotation1 (const Vector<3,double>& axis);
37 
39  Rotation1 (const Rotation1&);
40 
42  Rotation1* clone () const;
43 
45  void set_axis (const Vector<3,double>& axis);
46 
48  Vector<3,double> get_axis () const;
49 
51  void set_phi (const Estimate<double>& radians);
52 
54  Estimate<double> get_phi () const;
55 
57  void set_parameter_policy (OneParameter* policy);
58 
60  void set_param_name (const std::string& name);
61 
63  void set_param_description (const std::string& name);
64 
65  // ///////////////////////////////////////////////////////////////////
66  //
67  // Function implementation
68  //
69  // ///////////////////////////////////////////////////////////////////
70 
72  std::string get_name () const;
73 
75  void parse (const std::string& line);
76 
78  void print (std::string& text) const;
79 
80  protected:
81 
83  void calculate (Jones<double>& result, std::vector<Jones<double> >*);
84 
86  Vector<3,double> axis;
87 
88  void init ();
89  };
90 
91 }
92 
93 #endif
Abstract base class implements parameter storage and access.
Definition: OneParameter.h:26
void set_description(const std::string &_description)
Set the description of the parameter.
Definition: OneParameter.h:66
Rotation1 * clone() const
Clone operator.
Definition: Rotation1.C:34
Estimate< double > get_phi() const
Get the rotation angle in radians.
Definition: Rotation1.C:82
void set_name(const std::string &_name)
Set the name of the parameter.
Definition: OneParameter.h:54
void set_phi(const Estimate< double > &radians)
Set the rotation angle in radians.
Definition: Rotation1.C:74
const ScalarMath sin(const ScalarMath &x)
Return a ScalarMath instance representing sin(x)
Definition: ScalarMath.C:160
Represents a rotation (passive unitary transformation) about a fixed axis.
Definition: Rotation1.h:35
void print(std::string &text) const
Print the values of model parameters and fit flags to a string.
Definition: Rotation1.C:149
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void set_axis(const Vector< 3, double > &axis)
Set the axis about which the rotation occurs.
Definition: Rotation1.C:59
std::string get_name() const
Return the name of the class.
Definition: Rotation1.C:40
void calculate(Jones< double > &result, std::vector< Jones< double > > *)
Calculate the Jones matrix and its gradient.
Definition: Rotation1.C:98
Vector< 3, double > get_axis() const
Get the axis about which the rotation occurs.
Definition: Rotation1.C:68
void set_param_name(const std::string &name)
Set the name of the parameter.
Definition: Rotation1.C:45
Rotation1(const Vector< 3, double > &axis)
Construct for the specified axis.
Definition: Rotation1.C:21
const ScalarMath cos(const ScalarMath &x)
Return a ScalarMath instance representing cos(x)
Definition: ScalarMath.C:168
void parse(const std::string &line)
Parse the values of model parameters and fit flags from a string.
Definition: Rotation1.C:125
Vector< 3, double > axis
The axis along which the rotation occurs.
Definition: Rotation1.h:91
void set_param_description(const std::string &name)
Set the description of the parameter.
Definition: Rotation1.C:52
void set_parameter_policy(OneParameter *policy)
Set the parameter management policy.
Definition: Rotation1.C:87

Generated using doxygen 1.8.17