StokesCovariance.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2009 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Polarimetry/Pulsar/StokesCovariance.h
10
11#ifndef __Pulsar_StokesCovariance_h
12#define __Pulsar_StokesCovariance_h
13
14#include "Pulsar/Container.h"
15
16#include "Stokes.h"
17#include "Jones.h"
18#include "Matrix.h"
19
20namespace Pulsar {
21
22 class FourthMoments;
23 class Profile;
24
26 class StokesCovariance : public Container {
27
28 public:
29
31 static const unsigned nmoment;
32
35
38
41
43 virtual StokesCovariance* clone () const;
44
46 void resize (unsigned nbin);
47
49 unsigned get_nbin () const;
50
52 double get_nsample () const;
53
55 const Profile* get_Profile (unsigned i) const;
56
58 Profile* get_Profile (unsigned i);
59
61 Matrix<4,4,double> get_covariance (unsigned ibin) const;
62
64 void set_covariance (unsigned ibin, const Matrix<4,4,double>&);
65
67 void scale (double scale);
68
70 void rotate_phase (double turns);
71
73 void transform (const Jones<double>& response);
74
76 void transform (const Matrix<4,4,double>& response);
77
78 protected:
79
82
83 };
84
85}
86
87
88#endif
89
90
91
Data storage implementations.
Definition Container.h:19
Definition FourthMoments.h:20
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
const Profile * get_Profile(unsigned i) const
Get the specifed constant profile.
Definition StokesCovariance.C:85
double get_nsample() const
Get the (effective) number of samples in each sub-sample.
Definition StokesCovariance.C:76
void resize(unsigned nbin)
Set the number of bins.
Definition StokesCovariance.C:60
Reference::To< FourthMoments > covariance
References to the covariance profiles.
Definition StokesCovariance.h:81
Matrix< 4, 4, double > get_covariance(unsigned ibin) const
Get the Stokes covariance for the specified bin.
Definition StokesCovariance.C:103
void scale(double scale)
multiplies each bin of each profile by scale
Definition StokesCovariance.C:145
void rotate_phase(double turns)
Rotate the phase of each profile.
Definition StokesCovariance.C:150
void transform(const Jones< double > &response)
Perform the congruence transformation on each bin of the profile.
Definition StokesCovariance.C:158
virtual StokesCovariance * clone() const
Clone operator.
Definition StokesCovariance.C:43
static const unsigned nmoment
The number of unique fourth moments in a Stokes covariance matrix.
Definition StokesCovariance.h:31
StokesCovariance()
Default constructor.
void set_covariance(unsigned ibin, const Matrix< 4, 4, double > &)
Set the Stokes covariance for the specified bin.
Definition StokesCovariance.C:126
unsigned get_nbin() const
Get the number of bins.
Definition StokesCovariance.C:68
~StokesCovariance()
Destructor.
Definition StokesCovariance.C:51
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0