TemplateUncertainty.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/TemplateUncertainty.h
10 
11 #ifndef __Calibration_TemplateUncertainty_H
12 #define __Calibration_TemplateUncertainty_H
13 
14 #include "Pulsar/ObservationUncertainty.h"
15 #include "MEAL/Complex2.h"
16 
17 namespace Calibration {
18 
20  class TemplateUncertainty : public ObservationUncertainty
21  {
22 
23  public:
24 
27 
29  TemplateUncertainty* clone () const;
30 
32  void add (const Uncertainty*);
33 
35  void set_variance (const Stokes<double>& var);
36 
38  void set_template_variance (const Stokes<double>& var);
39 
41  void set_variance (const Stokes< std::complex<double> >& var);
42 
44  void set_template_variance (const Stokes< std::complex<double> >& var);
45 
48  const MEAL::Complex2* get_transformation () const;
49 
51  virtual double get_weighted_norm (const Jones<double>&) const;
52 
54  virtual Jones<double> get_weighted_conjugate (const Jones<double>&) const;
55 
57  virtual Stokes< std::complex<double> >
59 
60  protected:
61 
63  Stokes< std::complex<double> > observation_variance;
64 
66  Stokes< std::complex<double> > template_variance;
67 
70 
72  bool built;
73 
76 
78  virtual void build ();
79 
80  void check_build () const;
81  };
82 
83 }
84 
85 #endif
virtual double get_weighted_norm(const Jones< double > &) const
Given a coherency matrix, return the weighted norm.
Definition: TemplateUncertainty.C:102
virtual Jones< double > get_weighted_conjugate(const Jones< double > &) const
Given a coherency matrix, return the weighted conjugate matrix.
Definition: TemplateUncertainty.C:110
TemplateUncertainty * clone() const
Clone operator.
Definition: TemplateUncertainty.C:34
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
static Archive * load(const std::string &name)
Factory returns a new instance loaded from filename.
Definition: Archive_load.C:28
virtual Stokes< std::complex< double > > get_weighted_components(const Jones< double > &) const
Given a coherency matrix, return the weighted Stokes parameters.
Definition: TemplateUncertainty.C:122
TemplateUncertainty()
Default constructor.
Definition: TemplateUncertainty.C:28
static void set_verbosity(unsigned level)
Set the verbosity level (0 to 3)
Definition: Archive_verbose.C:19
void add(const Uncertainty *)
Add the uncertainty of another instance.
Definition: TemplateUncertainty.C:40
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
bool built
Flag set when inv_var attribute is up-to-date.
Definition: TemplateUncertainty.h:82
Stokes< double > get_variance() const
Combines the uncertainty of the template and the observation.
Definition: TemplateUncertainty.h:25
void set_transformation(MEAL::Complex2 *transformation)
Set the transformation from template to observation.
Definition: TemplateUncertainty.C:82
void connect(Class *instance, Method method)
Stokes< std::complex< double > > template_variance
The variance of the template Stokes parameters.
Definition: TemplateUncertainty.h:76
void set_variance(const Stokes< double > &var)
Set the uncertainty of the observation.
Definition: TemplateUncertainty.C:51
Reference::To< MEAL::Complex2 > transformation
The transformation from template to observation.
Definition: TemplateUncertainty.h:79
void set_template_variance(const Stokes< double > &var)
Set the uncertainty of the template.
Definition: TemplateUncertainty.C:59
void set_transformation(const Jones< double > &)
Stokes< std::complex< double > > observation_variance
The variance of the observed Stokes parameters.
Definition: TemplateUncertainty.h:73
const std::string get_message() const
Callback< Attribute > changed
void set_variance(const Stokes< double > &)
Profile * get_Profile(unsigned ipol, unsigned ichan)
Returns a pointer to the Profile given by the specified indeces.
Definition: Integration.C:306
virtual void build()
Compute inv_var attribute.
Definition: TemplateUncertainty.C:144
void changed(MEAL::Function::Attribute a)
Callback method attached to transformation::changed signal.
Definition: TemplateUncertainty.C:136

Generated using doxygen 1.8.17