HOPS
HOPS class reference
MHO_InterpolateFringePeak.hh
Go to the documentation of this file.
1 #ifndef MHO_InterpolateFringePeak_HH__
2 #define MHO_InterpolateFringePeak_HH__
3 
4 #include <algorithm>
5 #include <cmath>
6 #include <complex>
7 
9 #include "MHO_Operator.hh"
10 
11 #include "MHO_FringeRotation.hh"
12 
13 namespace hops
14 {
15 
28 {
29  public:
32 
37 
42 
48  void SetReferenceFrequency(double ref_freq) { fRefFreq = ref_freq; }
49 
55  void SetReferenceTimeOffset(double frt_offset) { fFRTOffset = frt_offset; }
56 
64  void SetMaxBins(int sbd_max, int mbd_max, int dr_max);
65 
71  void SetSBDArray(const visibility_type* sbd_arr) { fSBDArray = sbd_arr; }
72 
78  void SetWeights(const weight_type* weights) { fWeights = weights; }
79 
85  void SetMBDAxis(const time_axis_type* mbd_ax) { fMBDAxis.Copy(*mbd_ax); }
86 
92  void SetDRAxis(const delay_rate_axis_type* dr_ax) { fDRAxis.Copy(*dr_ax); }
93 
101  void SetSBDWindow(double low, double high) { SetWindow(fSBDWin, fSBDWinSet, low, high); }
102 
103  void SetMBDWindow(double low, double high) { SetWindow(fMBDWin, fMBDWinSet, low, high); }
104 
105  void SetDRWindow(double low, double high) { SetWindow(fDRWin, fDRWinSet, low, high); }
106 
111  {
112  fSBDWinSet = false;
113  fMBDWinSet = false;
114  fDRWinSet = false;
115  }
116 
123  virtual bool Initialize() override;
130  virtual bool Execute() override;
131 
137  double GetSBDelay() const { return fSBDelay; }
138 
144  double GetMBDelay() const { return fMBDelay; }
145 
151  double GetDelayRate() const { return fDelayRate; }
152 
158  double GetFringeRate() const { return fFringeRate; }
159 
165  double GetFringeAmplitude() const { return fFringeAmp; }
166 
167  private:
168  int fMBDMaxBin;
169  int fDRMaxBin;
170  int fSBDMaxBin;
171 
172  double fRefFreq;
173  double fFRTOffset;
174  double fTotalSummedWeights;
175  const visibility_type* fSBDArray;
176  const weight_type* fWeights;
177 
178  time_axis_type fMBDAxis;
179  delay_rate_axis_type fDRAxis;
180 
181  void fine_peak_interpolation();
182 
183  static void SetWindow(double* win, bool& win_set, double low, double high)
184  {
185  win[0] = std::min(low, high);
186  win[1] = std::max(low, high);
187  win_set = true;
188  }
189 
190  bool fSBDWinSet;
191  bool fMBDWinSet;
192  bool fDRWinSet;
193  double fSBDWin[2];
194  double fMBDWin[2];
195  double fDRWin[2];
196 
198 
199  double fSBDelay;
200  double fMBDelay;
201  double fDelayRate;
202  double fFringeRate;
203  double fFringeAmp;
204 
205  //copy of max555.c impl
206  void max555(MHO_NDArrayWrapper< double, 3 >&, double xlim[3][2], double xi[3], double* drfmax);
207  void interp555(MHO_NDArrayWrapper< double, 3 >&, double xi[3], double* drfval);
208  double dwin(double, double, double);
209 
210  //class which implements vrot
211  MHO_FringeRotation fRot;
212 };
213 
214 } // namespace hops
215 
216 #endif
virtual void Copy(const MHO_Axis &rhs)
Expensive copy for MHO_Axis that handles special treatment of index/interval labels.
Definition: MHO_Axis.hh:212
void SetOptimizeClosureTrue()
Setter for optimize closure true.
Definition: MHO_FringeRotation.hh:78
void SetOptimizeClosureFalse()
Setter for optimize closure false.
Definition: MHO_FringeRotation.hh:83
Class MHO_InterpolateFringePeak.
Definition: MHO_InterpolateFringePeak.hh:28
void SetMBDWindow(double low, double high)
Definition: MHO_InterpolateFringePeak.hh:103
void SetDRWindow(double low, double high)
Definition: MHO_InterpolateFringePeak.hh:105
virtual ~MHO_InterpolateFringePeak()
Definition: MHO_InterpolateFringePeak.hh:31
virtual bool Initialize() override
Initializes MHO_InterpolateFringePeak object by checking and retrieving necessary data.
Definition: MHO_InterpolateFringePeak.cc:33
double GetFringeAmplitude() const
Getter for fringe amplitude.
Definition: MHO_InterpolateFringePeak.hh:165
void SetReferenceTimeOffset(double frt_offset)
Setter for reference time offset.
Definition: MHO_InterpolateFringePeak.hh:55
MHO_InterpolateFringePeak()
Definition: MHO_InterpolateFringePeak.cc:7
void SetMaxBins(int sbd_max, int mbd_max, int dr_max)
Setter for max bins (location)
Definition: MHO_InterpolateFringePeak.cc:67
void SetSBDArray(const visibility_type *sbd_arr)
Setter for sbd array.
Definition: MHO_InterpolateFringePeak.hh:71
double GetDelayRate() const
Getter for delay rate.
Definition: MHO_InterpolateFringePeak.hh:151
void SetMBDAxis(const time_axis_type *mbd_ax)
Setter for mbd axis.
Definition: MHO_InterpolateFringePeak.hh:85
double GetSBDelay() const
Getter for sbdelay.
Definition: MHO_InterpolateFringePeak.hh:137
void SetReferenceFrequency(double ref_freq)
Setter for reference frequency.
Definition: MHO_InterpolateFringePeak.hh:48
void ClearWindows()
Removes any previously set search windows.
Definition: MHO_InterpolateFringePeak.hh:110
void EnableOptimizeClosure()
Sets optimize closure to true (not used for 'simul' method).
Definition: MHO_InterpolateFringePeak.hh:36
double GetMBDelay() const
Getter for mbdelay.
Definition: MHO_InterpolateFringePeak.hh:144
void SetWeights(const weight_type *weights)
Setter for weights.
Definition: MHO_InterpolateFringePeak.hh:78
void DisableOptimizeClosure()
Disables optimize closure.
Definition: MHO_InterpolateFringePeak.hh:41
void SetSBDWindow(double low, double high)
Setters for the (user) search windows, the interpolation is constrained to lie within these windows a...
Definition: MHO_InterpolateFringePeak.hh:101
void SetDRAxis(const delay_rate_axis_type *dr_ax)
Setter for dr axis.
Definition: MHO_InterpolateFringePeak.hh:92
double GetFringeRate() const
Getter for fringe rate.
Definition: MHO_InterpolateFringePeak.hh:158
virtual bool Execute() override
Executes fine peak interpolation and returns success.
Definition: MHO_InterpolateFringePeak.cc:61
Class MHO_Operator.
Definition: MHO_Operator.hh:21
#define min(a, b)
Definition: max555.c:9
#define max(a, b)
Definition: max555.c:10
Definition: MHO_AdhocFlagging.hh:18