HOPS
HOPS class reference
MHO_PolProductSummation.hh
Go to the documentation of this file.
1 #ifndef MHO_PolProductSummation_HH__
2 #define MHO_PolProductSummation_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 #include "MHO_Reducer.hh"
18 
19 namespace hops
20 {
21 
33 class MHO_PolProductSummation: public MHO_UnaryOperator< visibility_type >
34 {
35  public:
37  virtual ~MHO_PolProductSummation();
38 
39  //perhaps we should have a separate operator to handle the treatment of the weights?
45  void SetWeights(weight_type* w) { fWeights = w; }
46 
52  void SetPolProductSumLabel(std::string ppl) { fSummedPolProdLabel = ppl; }
53 
59  void SetPolProductSet(std::vector< std::string >& pp_vec) { fPolProductSet = pp_vec; };
60 
68  void SetReferenceStationCoordinateData(station_coord_type* ref_data) { fRefData = ref_data; };
69 
77  void SetRemoteStationCoordinateData(station_coord_type* rem_data) { fRemData = rem_data; };
78 
79  //parallactic angle values for each station (expects degrees)
85  void SetReferenceParallacticAngle(double p) { fRefParAngle = p; }
86 
92  void SetRemoteParallacticAngle(double p) { fRemParAngle = p; }
93 
100  void SetReferenceMountType(std::string mt) { fRefMountType = mt; }
101 
108  void SetRemoteMountType(std::string mt) { fRemMountType = mt; }
109 
110  protected:
118  virtual bool InitializeInPlace(visibility_type* in) override;
127  virtual bool InitializeOutOfPlace(const visibility_type* in, visibility_type* out) override;
128 
136  virtual bool ExecuteInPlace(visibility_type* in) override;
145  virtual bool ExecuteOutOfPlace(const visibility_type* in, visibility_type* out) override;
146 
147  private:
148  weight_type* fWeights;
149 
150  //reducer operators which do the summation
153 
159  void PreMultiply(visibility_type* in);
160 
167  std::complex< double > GetPrefactor(std::string pp_label);
168 
169  void FixLabels(visibility_type* in);
170 
171  std::string fSummedPolProdLabel;
172  std::vector< std::string > fPolProductSet;
173 
174  double fRefParAngle;
175  double fRemParAngle;
176  std::string fRefMountType;
177  std::string fRemMountType;
178  station_coord_type* fRefData;
179  station_coord_type* fRemData;
180 };
181 
182 } // namespace hops
183 
184 #endif
Class MHO_PolProductSummation.
Definition: MHO_PolProductSummation.hh:34
void SetWeights(weight_type *w)
Setter for weights.
Definition: MHO_PolProductSummation.hh:45
virtual bool ExecuteOutOfPlace(const visibility_type *in, visibility_type *out) override
Copies input visibility data to output, pre-multiplies it, executes reducers and fixes labels.
Definition: MHO_PolProductSummation.cc:35
virtual ~MHO_PolProductSummation()
Definition: MHO_PolProductSummation.cc:14
virtual bool InitializeOutOfPlace(const visibility_type *in, visibility_type *out) override
Initializes reducer (operators) and checks their initialization status for out-of-place processing.
Definition: MHO_PolProductSummation.cc:63
void SetReferenceStationCoordinateData(station_coord_type *ref_data)
Setter for reference station coordinate data.
Definition: MHO_PolProductSummation.hh:68
void SetRemoteMountType(std::string mt)
Setter for remote mount type.
Definition: MHO_PolProductSummation.hh:108
virtual bool InitializeInPlace(visibility_type *in) override
Initializes reducer (operators) and checks initialization status.
Definition: MHO_PolProductSummation.cc:53
void SetRemoteParallacticAngle(double p)
Setter for remote station parallactic angle.
Definition: MHO_PolProductSummation.hh:92
virtual bool ExecuteInPlace(visibility_type *in) override
Executes pol-product summation in-place and updates weights.
Definition: MHO_PolProductSummation.cc:16
void SetReferenceParallacticAngle(double p)
Setter for reference station parallactic angle.
Definition: MHO_PolProductSummation.hh:85
void SetReferenceMountType(std::string mt)
Setter for reference mount type.
Definition: MHO_PolProductSummation.hh:100
void SetPolProductSumLabel(std::string ppl)
Setter for pol product sum label.
Definition: MHO_PolProductSummation.hh:52
void SetPolProductSet(std::vector< std::string > &pp_vec)
Setter for pol product set.
Definition: MHO_PolProductSummation.hh:59
void SetRemoteStationCoordinateData(station_coord_type *rem_data)
Setter for remote station coordinate data.
Definition: MHO_PolProductSummation.hh:77
MHO_PolProductSummation()
Definition: MHO_PolProductSummation.cc:8
Class MHO_Reducer.
Definition: MHO_Reducer.hh:31
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_AdhocFlagging.hh:18