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 
20 namespace 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 
void rotate_phase(double turns)
Rotate the phase of each profile.
Definition: StokesCovariance.C:150
unsigned get_nbin() const
Get the number of bins.
Definition: StokesCovariance.C:68
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
Reference::To< FourthMoments > covariance
References to the covariance profiles.
Definition: StokesCovariance.h:86
Matrix< 4, 4, double > get_covariance(unsigned ibin) const
Get the Stokes covariance for the specified bin.
Definition: StokesCovariance.C:103
static const unsigned nmoment
The number of unique fourth moments in a Stokes covariance matrix.
Definition: StokesCovariance.h:36
void transform(const Jones< double > &response)
Perform the congruence transformation on each bin of the profile.
Definition: StokesCovariance.C:158
void set_covariance(unsigned ibin, const Matrix< 4, 4, double > &)
Set the Stokes covariance for the specified bin.
Definition: StokesCovariance.C:126
void resize(unsigned nbin)
Set the number of bins.
Definition: StokesCovariance.C:60
~StokesCovariance()
Destructor.
Definition: StokesCovariance.C:51
virtual StokesCovariance * clone() const
Clone operator.
Definition: StokesCovariance.C:43
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
Phase-resolved four-dimensional covariance matrix of Stokes parameters.
Definition: StokesCovariance.h:31
void scale(double scale)
multiplies each bin of each profile by scale
Definition: StokesCovariance.C:145
double get_nsample() const
Get the (effective) number of samples in each sub-sample.
Definition: StokesCovariance.C:76
Definition: FourthMoments.h:24
virtual unsigned get_size() const
get the size of the profile vector
Definition: MoreProfiles.C:44
StokesCovariance()
Default constructor.
const Profile * get_Profile(unsigned i) const
Get the specifed constant profile.
Definition: StokesCovariance.C:85

Generated using doxygen 1.8.17