HOPS
HOPS class reference
MHO_Passband.hh
Go to the documentation of this file.
1 #ifndef MHO_Passband_HH__
2 #define MHO_Passband_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_Passband: public MHO_UnaryOperator< visibility_type >
32 {
33  public:
34  MHO_Passband();
35  virtual ~MHO_Passband();
36 
42  void SetWeights(weight_type* weights) { fWeights = weights; };
43 
54  void SetPassband(const double& first, const double& second)
55  {
56  //if second > first then this is an 'exclusion'
57  //telling us this is a chunk of spectrum to cut
58  //this is the legacy behavior
59  if(second < first)
60  {
61  fIsExclusion = true;
62  fLow = second;
63  fHigh = first;
64  }
65  else
66  {
67  //if first < second, then this chunk is the 'passed' band
68  //so everything outside of this range is cut
69  fIsExclusion = false;
70  fLow = first;
71  fHigh = second;
72  }
73  }
74 
75  protected:
83  virtual bool InitializeInPlace(visibility_type* in) override;
92  virtual bool InitializeOutOfPlace(const visibility_type* in, visibility_type* out) override;
93 
101  virtual bool ExecuteInPlace(visibility_type* in) override;
110  virtual bool ExecuteOutOfPlace(const visibility_type* in, visibility_type* out) override;
111 
112  private:
113  bool fIsExclusion;
114  double fLow;
115  double fHigh;
116 
117  std::string fBandwidthKey;
118  std::string fSidebandLabelKey;
119  std::string fLowerSideband;
120  std::string fUpperSideband;
121 
122  weight_type* fWeights;
123 };
124 
125 } // namespace hops
126 
127 #endif
Class MHO_Passband.
Definition: MHO_Passband.hh:32
void SetWeights(weight_type *weights)
Setter for weights.
Definition: MHO_Passband.hh:42
void SetPassband(const double &first, const double &second)
Setter for passband.
Definition: MHO_Passband.hh:54
virtual bool ExecuteOutOfPlace(const visibility_type *in, visibility_type *out) override
Copies input visibility data and executes in-place processing.
Definition: MHO_Passband.cc:186
virtual bool InitializeInPlace(visibility_type *in) override
Initializes visibility_type pointer in-place and returns true.
Definition: MHO_Passband.cc:192
virtual bool InitializeOutOfPlace(const visibility_type *in, visibility_type *out) override
Initializes out-of-place visibility data.
Definition: MHO_Passband.cc:197
MHO_Passband()
Definition: MHO_Passband.cc:8
virtual bool ExecuteInPlace(visibility_type *in) override
Checks and excludes specific passbands within each channel of visibility data.
Definition: MHO_Passband.cc:22
virtual ~MHO_Passband()
Definition: MHO_Passband.cc:20
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_ChannelLabeler.hh:17