Tracer.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/Tracer.h
10 
11 #ifndef __MEAL_Tracer_H
12 #define __MEAL_Tracer_H
13 
14 #include "MEAL/Function.h"
15 
16 namespace MEAL
17 {
19  class Tracer : public Reference::Able
20  {
21 
22  public:
23 
25  Tracer ();
26 
28  ~Tracer ();
29 
31  virtual void watch (Function*);
32 
33  protected:
34 
37 
39  virtual void attribute_changed (Function::Attribute attribute);
40 
42  virtual void report () = 0;
43 
44  };
45 
46 }
47 
48 #endif
49 
T evaluate(std::vector< T > *grad=0) const
Return the Jones matrix and its gradient.
Definition: Evaluable.h:65
const ScalarMath exp(const ScalarMath &x)
Return a ScalarMath instance representing exp(x)
Definition: ScalarMath.C:224
void fit(const Pulsar::Parameters *model, std::vector< toa > &data, Pulsar::Parameters *postfit=NULL, bool track=false, Tempo::toa::State min_state=Tempo::toa::Normal)
void set_param(unsigned index, double value)
Set the value of the specified parameter.
Definition: Function.h:131
Represents a product of models.
Definition: ProductRule.h:25
void set_value(const Result &_value)
Set the value.
Definition: Value.h:44
Scalar * get_expression() const
Access the expression.
Definition: ScalarMath.h:70
const ScalarMath sinh(const ScalarMath &x)
Return a ScalarMath instance representing sinh(x)
Definition: ScalarMath.C:184
Reference::To< Function > model
The function to watch.
Definition: Tracer.h:46
An argument of a specified type.
Definition: Axis.h:31
virtual Stokes< Estimate< double > > get_stokes() const
Get the Stokes parameters and their estimated errors.
Definition: Coherency.C:84
Converts a Jones matrix into a Mueller matrix.
Definition: JonesMueller.h:27
Converts a higher dimensional function into a ScalarVector.
Definition: Vectorize.h:24
void covariance(Scalar *function, unsigned index, std::vector< unsigned > &imap, std::vector< std::vector< double > > &covar)
Definition: ChainRule.C:13
VectorRule implements a vector of Functions with a current index.
Definition: ComplexRVM.h:24
virtual void watch(Function *)
Trace changes in the specified function.
Definition: Tracer.C:26
A sum of orthogonally polarized modes.
Definition: OrthogonalModes.h:25
void set_Stokes(const Stokes< Estimate< float > > &)
Set the Stokes parameters.
Definition: Invariant.C:40
void set_model(T *model)
Set the Function with the parameters to be transformed.
Definition: BasisRule.h:110
void set_index(unsigned)
Set the index of the position angle array.
Definition: ScalarVector.C:18
void set_upper_bound(double bound)
Set the upper bound on the parameter value.
Definition: CyclicParameter.C:69
Generates a random Polar transformation within limits.
Definition: RandomPolar.h:24
A periodic parameter with bounds.
Definition: CyclicParameter.h:28
A correlation coefficient on the unit disk in the complex plane.
Definition: ComplexCorrelation.h:24
virtual Stokes< Estimate< double > > get_stokes() const
Get the Stokes parameters and their estimated errors.
Definition: SingularCoherency.C:100
unsigned get_nparam() const
Return the number of parameters.
Definition: Function.h:115
Represents a boost (Hermitian, dichroic) transformation.
Definition: Boost1.h:27
Represents a value with no free parameters.
Definition: Value.h:26
Propagates Stokes parameter uncertainty through congruence transformation.
Definition: StokesError.h:25
Changes the basis of the parameterization.
Definition: BasisRule.h:34
Abstract template base class of univariate Function implementations.
Definition: Univariate.h:26
virtual void apply() const =0
Apply the value of this Argument.
void set_transformation(const Jones< double > &)
Set the transformation.
Definition: StokesCovariance.C:30
void set_lower_bound(double bound)
Set the lower bound on the parameter value.
Definition: CyclicParameter.C:62
static bool verbose
Propagates Stokes parameter covariances through congruence transformation.
Definition: StokesCovariance.h:25
virtual void set_stokes(const Stokes< double > &stokes)
Set the Stokes parameters of the model.
Definition: SingularCoherency.C:79
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
Tracer()
Default constructor.
Definition: Tracer.C:13
Parameter policy for composite functions.
Definition: Composite.h:25
void set(std::complex< double > &c)
Set the complex value.
Definition: ComplexCorrelation.h:54
Value get_Value(const Type &value)
Return an instance of the Value of this argument.
Definition: Axis.h:92
Represents the polar decomposition of a transformation.
Definition: Polar.h:34
The Rotating Vector Model (RVM) of Radhakrishnan & Cooke.
Definition: RotatingVectorModel.h:28
Matrix< 4, 4, double > get_covariance() const
Get the variances of the output Stokes parameters.
Definition: StokesCovariance.C:46
Returns the outer product of two spinors, .
Definition: SpinorJones.h:27
const ScalarMath sqrt(const ScalarMath &x)
Return a ScalarMath instance representing x^.5.
Definition: ScalarMath.C:151
Represents the union of disjoint vector subspaces.
Definition: Union.h:25
Type * get() const
void set_value(const Type &value)
Set the value of the argument represented by this axis.
Definition: Axis.h:95
Computes the invariant interval.
Definition: Invariant.h:30
Scalar functions that depend on an index.
Definition: ScalarVector.h:26
Represents a scalar parameter, .
Definition: ScalarParameter.h:24
Function * get_Function()
Return the model.
Definition: Projection.C:50
Value * new_Value(const Type &value)
Return a new instance of the Value of this argument.
Definition: Axis.h:89
Partial coherence of 100% polarized modes.
Definition: CrossCoherency.h:33
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void add_model(T *model)
Add an element to the result.
Definition: GroupRule.h:185
static size_t get_instance_count()
static bool verbose
Verbosity flag.
Definition: Function.h:54
Manages a Function and the mapping of its parameters into a Composite.
Definition: Projection.h:27
ScalarMath get_correct_result() const
Get the bias-corrected estimate.
Definition: Invariant.C:71
Convenience interface to building expressions from elements.
Definition: ScalarMath.h:24
double get_param(unsigned index) const
Return the value of the specified parameter.
Definition: Function.h:127
The value of an argument.
Definition: Argument.h:46
A coherency matrix with determinant equal to zero.
Definition: SingularCoherency.h:32
A coherency matrix parameterized by a logarithmic gain times a boost.
Definition: ModeCoherency.h:38
void set_period(double period)
Set the period of the parameter value.
Definition: CyclicParameter.C:76
Represents a model with no parameters.
Definition: NoParameters.h:24
void set_azimuth(CyclicParameter *azimuth)
Set the matching azimuth and behave like an elevation.
Definition: CyclicParameter.C:83
void connect(Class *instance, Method method)
~Tracer()
Destructor.
Definition: Tracer.C:17
bool verbose
Returns the Spinor representation of a singular coherency matrix.
Definition: JonesSpinor.h:27
static bool cache_results
When set, use the Cached evaluation policy and callbacks.
Definition: Function.h:66
void set_variance(const Stokes< double > &)
Set the variances of the input Stokes parameters.
Definition: StokesCovariance.C:18
Pure virtual base class of all functions.
Definition: Function.h:49
unsigned size() const
Get the dimension of the union.
Definition: Union.h:51
const ScalarMath cos(const ScalarMath &x)
Return a ScalarMath instance representing cos(x)
Definition: ScalarMath.C:168
Attribute
Function attributes that require the attention of Composite models.
Definition: Function.h:167
Polynomial function with an arbitrary number of coefficients.
Definition: Polynomial.h:26
void push_back(T *model)
Add an element to the array.
Definition: VectorRule.h:125
virtual void report()=0
Method called to report state.
virtual void set_vector(const Vector< 3, double > &)
Set the Stokes polarization vector.
Definition: SingularCoherency.C:84
Represents a rotation (passive unitary transformation) about a free axis.
Definition: Rotation.h:38
static Function * load_Function(const std::string &filename)
Construct a new Function instance from a file.
Definition: Function_load.C:12
Callback< Attribute > changed
Callback executed when a Function Attribute has been changed.
Definition: Function.h:175
Represents a sum of models.
Definition: SumRule.h:25
void set_transformation(const Matrix< N, N, double > &xform)
Set the basis transformation.
Definition: BasisRule.h:147
Estimate< double > get_Estimate() const
Evaluate the expression and its estimated error.
Definition: ScalarMath.C:279
virtual void attribute_changed(Function::Attribute attribute)
Method called when a Function attribute has changed.
Definition: Tracer.C:45
double get_abscissa() const
Get the abscissa value.
Definition: Univariate.h:54
Template combines a reference to a Component and its Projection.
Definition: Projection.h:65
void set_parameter_policy(OneParameter *policy)
Set the parameter management policy.
Definition: Rotation1.C:87
Represents a scalar argument, .
Definition: ScalarArgument.h:25
void set_argument(unsigned dimension, Argument *axis)
Set the independent variable of the specified dimension.
Definition: Function.h:151
Represents a pure depolarizer transformation.
Definition: Depolarizer.h:40
void push_back(ScalarVector *)
Add a vector space.
Definition: Union.C:46
virtual void set_spinor(Spinor *)
Set spinor A == spinor B.
Definition: SpinorJones.C:24
Represents a unit vector in three-dimensional space.
Definition: UnitTangent.h:46
Represents a boost (Hermitian, dichroic) transformation.
Definition: Boost.h:27

Generated using doxygen 1.8.17