CalibratorStokes.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2003 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Extensions/Pulsar/CalibratorStokes.h
10
11#ifndef __CalibratorStokes_h
12#define __CalibratorStokes_h
13
14#include "Pulsar/HasChannels.h"
15#include "Stokes.h"
16#include "Estimate.h"
17
18namespace Pulsar {
19
21
23 class CalibratorStokes : public HasChannels {
24
25 public:
26
29 {
30 BeforeProjection, // e.g. satellite-borne
31 BeforeBasis, // e.g. radiated onto primary reflector
32 BeforeFrontend, // e.g. radiated into feedhorn
33 BeforeIdeal, // e.g. coupled after transducer
34 BeforeBackend, // not sure why
35 Unknown // don't know
36 };
37
40
42 CalibratorStokes (const CalibratorStokes& extension);
43
45 const CalibratorStokes& operator= (const CalibratorStokes& extension);
46
49
51 CalibratorStokes* clone () const { return new CalibratorStokes( *this ); }
52
55
57 class Interface;
58
60 std::string get_short_name () const { return "ref"; }
61
63 void set_nchan (unsigned nchan);
65 unsigned get_nchan () const;
66
71
73 void remove_chan (unsigned first, unsigned last);
74
76 void set_valid (unsigned ichan, bool valid);
78 bool get_valid (unsigned ichan) const;
79
81 void set_stokes (unsigned ichan, const Stokes< Estimate<float> >& stokes);
83 Stokes< Estimate<float> > get_stokes (unsigned ichan) const;
84
85 unsigned get_nparam () const { return 3; /* Stokes Q,U,V */ }
86 Estimate<float> get_Estimate ( unsigned iparam, unsigned ichan ) const;
87 void set_Estimate (unsigned iparam, unsigned ichan, Estimate<float>&);
88 void set_value (unsigned iparam, unsigned ichan, double val);
89 void set_variance (unsigned iparam, unsigned ichan, double var);
90
92 void frequency_append (Archive* to, const Archive* from);
93
94 protected:
95
97
106
108
109 std::vector< Stokes< Estimate<float> > > stokes;
110
112 void range_check (unsigned ichan, const char* method) const;
113
114 friend class CalibratorStokes::Interface;
115
116 // Internal convenience interface to the Stokes polarization vector data
117 class PolnVector;
118
120 PolnVector* get_poln (unsigned ichan);
121
123 };
124
125 std::ostream& operator << (std::ostream& ostr,
127 std::istream& operator >> (std::istream& is,
129
130}
131
132#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
Stores the Stokes parameters of the reference source.
Definition CalibratorStokes.h:23
std::vector< Stokes< Estimate< float > > > stokes
The Stokes parameters for each frequency channel.
Definition CalibratorStokes.h:109
CalibratorStokes()
Default constructor.
Definition CalibratorStokes.C:16
bool get_valid(unsigned ichan) const
Get the validity flag for the specified channel.
Definition CalibratorStokes.C:87
CalibratorStokes * clone() const
Clone method.
Definition CalibratorStokes.h:51
CouplingPoint
The point where the reference source signal is coupled.
Definition CalibratorStokes.h:29
CouplingPoint coupling_point
The point where the reference source signal is coupled.
Definition CalibratorStokes.h:105
PolnVector * get_poln(unsigned ichan)
Interface to StokesVector.
Definition CalibratorStokes.C:222
CouplingPoint get_coupling_point() const
The point where the reference source signal is coupled.
Definition CalibratorStokes.C:54
Stokes< Estimate< float > > get_stokes(unsigned ichan) const
Get the Stokes parameters of the specified frequency channel.
Definition CalibratorStokes.C:104
void frequency_append(Archive *to, const Archive *from)
Append CalibratorStokes Extension data from another Archive.
Definition CalibratorStokes.C:155
std::string get_short_name() const
Return a short name.
Definition CalibratorStokes.h:60
void set_valid(unsigned ichan, bool valid)
Set the validity flag for the specified channel.
Definition CalibratorStokes.C:77
void set_coupling_point(CouplingPoint)
Set the point where the reference source signal is coupled.
Definition CalibratorStokes.C:48
void set_nchan(unsigned nchan)
Set the number of frequency channels.
Definition CalibratorStokes.C:60
TextInterface::Parser * get_interface()
Get the text ineterface.
Definition CalibratorStokes.C:250
~CalibratorStokes()
Destructor.
Definition CalibratorStokes.C:43
void range_check(unsigned ichan, const char *method) const
Ensure that ichan <= get_nchan.
Definition CalibratorStokes.C:147
void remove_chan(unsigned first, unsigned last)
Remove the inclusive range of channels.
Definition CalibratorStokes.C:71
void set_stokes(unsigned ichan, const Stokes< Estimate< float > > &stokes)
Set the Stokes parameters of the specified frequency channel.
Definition CalibratorStokes.C:95
const CalibratorStokes & operator=(const CalibratorStokes &extension)
Assignment operator.
Definition CalibratorStokes.C:34
unsigned get_nchan() const
Get the number of frequency channels.
Definition CalibratorStokes.C:66
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0