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 
61 
69  void SetReferenceStationCoordinateData(station_coord_type* ref_data) { fRefData = ref_data; };
70 
78  void SetRemoteStationCoordinateData(station_coord_type* rem_data) { fRemData = rem_data; };
79 
80  //parallactic angle values for each station (expects degrees)
86  void SetReferenceParallacticAngle(double p) { fRefParAngle = p; }
87 
93  void SetRemoteParallacticAngle(double p) { fRemParAngle = p; }
94 
95 
102  void SetReferenceMountType(std::string mt) { fRefMountType = mt; }
103 
110  void SetRemoteMountType(std::string mt) { fRemMountType = mt; }
111 
112  protected:
120  virtual bool InitializeInPlace(visibility_type* in) override;
129  virtual bool InitializeOutOfPlace(const visibility_type* in, visibility_type* out) override;
130 
138  virtual bool ExecuteInPlace(visibility_type* in) override;
147  virtual bool ExecuteOutOfPlace(const visibility_type* in, visibility_type* out) override;
148 
149  private:
150  weight_type* fWeights;
151 
152  //reducer operators which do the summation
155 
161  void PreMultiply(visibility_type* in);
162 
169  std::complex< double > GetPrefactor(std::string pp_label);
170 
171  void FixLabels(visibility_type* in);
172 
173  std::string fSummedPolProdLabel;
174  std::vector< std::string > fPolProductSet;
175 
176  double fRefParAngle;
177  double fRemParAngle;
178  std::string fRefMountType;
179  std::string fRemMountType;
180  station_coord_type* fRefData;
181  station_coord_type* fRemData;
182 };
183 
184 } // namespace hops
185 
186 #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:69
void SetRemoteMountType(std::string mt)
Setter for remote mount type.
Definition: MHO_PolProductSummation.hh:110
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:93
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:86
void SetReferenceMountType(std::string mt)
Setter for reference mount type.
Definition: MHO_PolProductSummation.hh:102
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:78
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_ChannelLabeler.hh:17