ModeSeparation.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2011 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/ModeSeparation.h
10 
11 #ifndef __Pulsar_ModeSeparation_H
12 #define __Pulsar_ModeSeparation_H
13 
14 #include "MEAL/Real4.h"
15 #include "MEAL/CrossCoherency.h"
16 #include "MEAL/ComplexCorrelation.h"
17 #include "MEAL/ScalarVector.h"
18 #include "MEAL/ScalarParameter.h"
19 
20 namespace Pulsar {
21 
23  class ModeSeparation : public Reference::Able
24  {
25  public:
26 
27  static bool verbose;
28 
30  ModeSeparation ();
31 
33  void set_mean (const Stokes< Estimate<double> >&);
34 
36  void set_covariance (const Matrix<4,4,Estimate<double> >&);
37 
39  void solve ();
40 
41  MEAL::Coherency* get_modeA () { return mode_A; }
42  MEAL::Coherency* get_modeB () { return mode_B; }
43  MEAL::Coherency* get_modeC () { return mode_C; }
44  MEAL::Complex* get_correlation () { return correlation; }
45  MEAL::Complex2* get_mean () { return mean; }
46  MEAL::Real4* get_covariance () { return covariance; }
47 
48  protected:
49 
51  Stokes< Estimate<double> > obs_mean;
52 
55 
58 
61 
65 
69 
73 
76 
79 
80  void init ();
81 
82  };
83 
84 }
85 
86 #endif
87 
void covariance(Scalar *function, unsigned index, std::vector< unsigned > &imap, std::vector< std::vector< double > > &covar)
Reference::To< MEAL::CrossCoherency > cross
Mode C (cross-coherency)
Definition: ModeSeparation.h:81
void solve()
Solve the equation.
Definition: ModeSeparation.C:268
Reference::To< MEAL::Coherency > mode_B
Mode B.
Definition: ModeSeparation.h:77
Definition: Archive.h:26
Reference::To< MEAL::Real4 > covariance
Covariance of the mode sum.
Definition: ModeSeparation.h:67
const ScalarMath sqrt(const ScalarMath &x)
Stokes< Estimate< double > > obs_mean
Mean Stokes parameters.
Definition: ModeSeparation.h:61
void add_model(T *model)
T get_value() const
Reference::To< MEAL::ScalarVector > space
Vector space of problem.
Definition: ModeSeparation.h:88
ModeSeparation()
Default constructor.
Definition: ModeSeparation.C:142
Matrix< 4, 4, Estimate< double > > obs_covariance
Mean covariance matrix.
Definition: ModeSeparation.h:64
Reference::To< MEAL::Complex2 > mean
Mean value of the mode sum.
Definition: ModeSeparation.h:70
void set_mean(const Stokes< Estimate< double > > &)
Set the estimated mean Stokes parameters.
Definition: ModeSeparation.C:182
Reference::To< MEAL::Coherency > mode_A
Mode A.
Definition: ModeSeparation.h:73
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_covariance(const Matrix< 4, 4, Estimate< double > > &)
Set the estimated covariance matrix of the Stokes parameters.
Definition: ModeSeparation.C:218

Generated using doxygen 1.8.17