SingleAxisPolynomial.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/SingleAxisPolynomial.h
10 
11 #ifndef __SingleAxisPolynomial_H
12 #define __SingleAxisPolynomial_H
13 
14 #include "MEAL/ChainRule.h"
15 #include "MEAL/Complex2.h"
16 #include "MEAL/Polynomial.h"
17 
18 namespace Calibration {
19 
20  class SingleAxis;
21 
23 
30  class SingleAxisPolynomial : public MEAL::ChainRule<MEAL::Complex2>
31  {
32 
33  public:
34 
36  static const unsigned npoly;
37 
39  SingleAxisPolynomial (unsigned ncoef = 0);
40 
43 
46 
49 
51  void set_abscissa (double value);
52 
54  void set_infit (unsigned coef, bool fit);
55 
57  void random (double max_result, double max_abscissa);
58 
59  // ///////////////////////////////////////////////////////////////////
60  //
61  // Model implementation
62  //
63  // ///////////////////////////////////////////////////////////////////
64 
66  std::string get_name () const;
67 
69  void set_argument (unsigned dimension, MEAL::Argument* axis);
70 
71  protected:
72 
74  std::vector< Reference::To<MEAL::Polynomial> > polynomial;
75 
78 
79  private:
80 
82  void init (unsigned ncoef);
83 
84  };
85 
86 }
87 
88 #endif
89 
~SingleAxisPolynomial()
Destructor.
Definition: SingleAxisPolynomial.C:74
SingleAxisPolynomial & operator=(const SingleAxisPolynomial &)
Assignment operator.
Definition: SingleAxisPolynomial.C:60
std::vector< Reference::To< MEAL::Polynomial > > polynomial
The Polynomial Functions.
Definition: SingleAxisPolynomial.h:79
void set_abscissa(double value)
Set the abscissa of each of the Polynomial functions.
Definition: SingleAxisPolynomial.C:132
void random(double max_result, double max_abscissa)
Generate random Polynomial coefficients.
Definition: SingleAxisPolynomial.C:102
void set_infit(unsigned coef, bool fit)
Set the fit flag for the specified coefficient of each Polynomial.
Definition: SingleAxisPolynomial.C:139
Callback< Type > signal
Instrumental gain, differential gain, and differential phase.
Definition: SingleAxis.h:38
std::string get_name() const
Return the name of the class.
Definition: SingleAxisPolynomial.C:79
void connect(Class *instance, Method method)
SingleAxisPolynomial(unsigned ncoef=0)
Default constructor.
Definition: SingleAxisPolynomial.C:45
Reference::To< SingleAxis > xform
The SingleAxis Complex2.
Definition: SingleAxisPolynomial.h:82
void set_argument(unsigned dimension, MEAL::Argument *axis)
Connect the set_abscissa method to the axis value.
Definition: SingleAxisPolynomial.C:84
A SingleAxis parameterized by Polynomial ordinates.
Definition: SingleAxisPolynomial.h:35
static const unsigned npoly
The number of free parameters in the SingleAxis model.
Definition: SingleAxisPolynomial.h:41

Generated using doxygen 1.8.17