HOPS
HOPS class reference
MHO_IonosphericPhaseCorrection.hh
Go to the documentation of this file.
1 #ifndef MHO_IonosphericPhaseCorrection_HH__
2 #define MHO_IonosphericPhaseCorrection_HH__
3 
4 #include <cctype>
5 #include <cmath>
6 #include <complex>
7 #include <map>
8 #include <vector>
9 
10 #include "MHO_Constants.hh"
11 #include "MHO_Message.hh"
12 
14 #include "MHO_TableContainer.hh"
15 #include "MHO_UnaryOperator.hh"
16 
17 namespace hops
18 {
19 
31 class MHO_IonosphericPhaseCorrection: public MHO_UnaryOperator< visibility_type >
32 {
33  public:
36 
42  void SetDifferentialTEC(double dTEC) { fdTEC = dTEC; };
43 
44  protected:
52  virtual bool InitializeInPlace(visibility_type* in) override;
61  virtual bool InitializeOutOfPlace(const visibility_type* in, visibility_type* out) override;
62 
70  virtual bool ExecuteInPlace(visibility_type* in) override;
79  virtual bool ExecuteOutOfPlace(const visibility_type* in, visibility_type* out) override;
80 
81  private:
82  double fdTEC;
83 
84  //constants
85  double fIonoK; //dTEC to phase constant
86  std::complex< double > fImagUnit;
87  double fDegToRad;
88 
89  //keys for tag retrieval and matching
90  std::string fChannelLabelKey;
91  std::string fSidebandLabelKey;
92  std::string fBandwidthKey;
93  std::string fLowerSideband;
94  std::string fUpperSideband;
95 
96  //minor helper function to make sure all strings are compared as upper-case only
97  void make_upper(std::string& s)
98  {
99  for(char& c : s)
100  {
101  c = toupper(c);
102  };
103  }
104 };
105 
106 } // namespace hops
107 
108 #endif
Class MHO_IonosphericPhaseCorrection.
Definition: MHO_IonosphericPhaseCorrection.hh:32
virtual bool ExecuteOutOfPlace(const visibility_type *in, visibility_type *out) override
Copies input visibility data and executes in-place correction.
Definition: MHO_IonosphericPhaseCorrection.cc:75
MHO_IonosphericPhaseCorrection()
Definition: MHO_IonosphericPhaseCorrection.cc:8
virtual bool InitializeOutOfPlace(const visibility_type *in, visibility_type *out) override
Initializes OutOfPlace using input visibility_type pointer and output visibility_type pointer.
Definition: MHO_IonosphericPhaseCorrection.cc:86
void SetDifferentialTEC(double dTEC)
Setter for differential TEC (controls phase dispersion)
Definition: MHO_IonosphericPhaseCorrection.hh:42
virtual bool ExecuteInPlace(visibility_type *in) override
Applies differential ionospheric phase correction to visibility data in-place.
Definition: MHO_IonosphericPhaseCorrection.cc:24
virtual bool InitializeInPlace(visibility_type *in) override
Initializes in-place visibility_type pointer.
Definition: MHO_IonosphericPhaseCorrection.cc:81
virtual ~MHO_IonosphericPhaseCorrection()
Definition: MHO_IonosphericPhaseCorrection.cc:22
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_ChannelLabeler.hh:17