RVM.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2021 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/RVM.h
10 
11 #ifndef __RVM_H
12 #define __RVM_H
13 
14 #include "MEAL/Univariate.h"
15 #include "MEAL/ScalarParameter.h"
16 #include "MEAL/ScalarArgument.h"
17 #include "MEAL/ScalarMath.h"
18 
19 namespace MEAL {
20 
22 
23  class RVM : public Univariate<Scalar>
24  {
25 
26  public:
27 
28  RVM ();
29 
31 
33 
36 
38  Scalar* get_north () { return north; }
40  Scalar* get_east () { return east; }
41 
42  protected:
43 
44  void set_atan_Psi (const ScalarMath& sin, const ScalarMath& cos);
45 
46  // the magnetic field line projected onto North
48 
49  // the magnetic field line projected onto East
51 
52  // pulse longitude
54 
55  private:
56 
57  // disable the calculate method
58  /* derived classes copy the evaluation policy of the
59  resulting ScalarMath expression */
60  void calculate (double&, std::vector<double>*) {}
61 
62  // the answer
63  Reference::To<Scalar> expression;
64 
65  };
66 
67 }
68 
69 #endif
Scalar * get_expression() const
Access the expression.
Definition: ScalarMath.h:70
Scalar * get_east()
Get the projection onto East.
Definition: RVM.h:50
Reference::To< ScalarParameter > magnetic_meridian
phi0: longitude of the magnetic merdian
Definition: RVM.h:45
const ScalarMath sin(const ScalarMath &x)
Return a ScalarMath instance representing sin(x)
Definition: ScalarMath.C:160
Reference::To< ScalarParameter > reference_position_angle
psi0: position angle at magnetic meridian
Definition: RVM.h:42
void copy_univariate_policy(const Univariate *other)
Copy the parameter policy of another instance.
Definition: Univariate.h:73
Represents a scalar parameter, .
Definition: ScalarParameter.h:24
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
Convenience interface to building expressions from elements.
Definition: ScalarMath.h:24
Scalar * get_north()
Get the projection onto North.
Definition: RVM.h:48
const ScalarMath cos(const ScalarMath &x)
Return a ScalarMath instance representing cos(x)
Definition: ScalarMath.C:168
Base class of different Rotating Vector Model parameterizations.
Definition: RVM.h:28
Pure virtual base class of scalar functions.
Definition: Scalar.h:24
Represents a scalar argument, .
Definition: ScalarArgument.h:25
void copy_parameter_policy(const Function *)
Copy the parameter policy of another instance.
Definition: Function.C:91
const ScalarMath atan2(const ScalarMath &y, const ScalarMath &x)
Return a ScalarMath instance representing tan(y/x)
Definition: ScalarMath.C:255

Generated using doxygen 1.8.17