HOPS
HOPS class reference
MHO_IonosphericFringeFitterOpenMP.hh
Go to the documentation of this file.
1 #ifndef MHO_IonosphericFringeFitterOpenMP_HH__
2 #define MHO_IonosphericFringeFitterOpenMP_HH__
3 
4 #include <memory>
5 #include <vector>
6 
9 #include "MHO_Tokenizer.hh"
10 
11 #ifdef _OPENMP
12  #include <omp.h>
13 #endif
14 
15 namespace hops
16 {
17 
19 {
20  double famp = 0.0;
21  double ion_diff = 0.0;
22 };
23 
36 {
37 
38  public:
41 
46  virtual void Run() override;
47 
51  void Finalize() override;
52 
59  virtual void Accept(MHO_FringeFitterVisitor* visitor) override { visitor->Visit(this); };
60 
61  protected:
67  int rjc_ion_search();
68 
75  void sort_tecs(int nion, std::vector< std::vector< double > >& dtec);
76 
82  int ion_search_smooth();
83 
92  void smoother(double* f, double* g, double* tec_step, int* npts);
93 
99  double calculate_approx_snr();
100 
101  double fInitialSBWin[2]; //save the initial SBD window
102  int ion_npts;
103 
104  //per-thread infrastructure for parallel ion search
106  visibility_type fVisRef; //clean reference copy of vis_data (before any ion correction)
107 
108  std::vector< visibility_type > fPerThreadVis; //per-thread working vis copies
109  std::vector< visibility_type > fPerThreadSBD; //per-thread SBD output buffers
110  std::vector< std::unique_ptr< MHO_NormFX > > fPerThreadNormFX; //per-thread norm fx operator
111 
112  std::vector< std::unique_ptr< MHO_MBDelaySearch > > fPerThreadMBDSearch;
113  std::vector< std::unique_ptr< MHO_InterpolateFringePeakOptimized > > fPerThreadPeakInterp;
114  std::vector< std::unique_ptr< MHO_IonosphericPhaseCorrection > > fPerThreadIono;
115 
116  std::vector< IonLoopResult > fIonLoopResults; //one slot per ionloop index
117 
118  private:
119  void initialize_ion_threads();
120 };
121 
122 } // namespace hops
123 
124 #endif
Class MHO_BasicFringeFitter.
Definition: MHO_BasicFringeFitter.hh:35
Class MHO_FringeData.
Definition: MHO_FringeData.hh:30
Class MHO_FringeFitterVisitor.
Definition: Calibration/include/MHO_FringeFitter.hh:189
virtual void Visit(MHO_FringeFitter *fitter)=0
Function Visit.
Class MHO_IonosphericFringeFitterOpenMP.
Definition: MHO_IonosphericFringeFitterOpenMP.hh:36
void Finalize() override
Finalizes fringe fitting process by storing search windows and generating plot data.
Definition: MHO_IonosphericFringeFitterOpenMP.cc:93
virtual void Run() override
Runs fringe fitting process with additial search over dTEC (with optional smoothing)
Definition: MHO_IonosphericFringeFitterOpenMP.cc:49
std::vector< std::unique_ptr< MHO_MBDelaySearch > > fPerThreadMBDSearch
Definition: MHO_IonosphericFringeFitterOpenMP.hh:112
std::vector< std::unique_ptr< MHO_IonosphericPhaseCorrection > > fPerThreadIono
Definition: MHO_IonosphericFringeFitterOpenMP.hh:114
double calculate_approx_snr()
Calculates approximate signal-to-noise ratio (SNR) for fringe fitting.
Definition: MHO_IonosphericFringeFitterOpenMP.cc:1114
void smoother(double *f, double *g, double *tec_step, int *npts)
Applies a smoothing curve (half-cosine) to input data array for fringe finding in ionospheric process...
Definition: MHO_IonosphericFringeFitterOpenMP.cc:1045
std::vector< std::unique_ptr< MHO_NormFX > > fPerThreadNormFX
Definition: MHO_IonosphericFringeFitterOpenMP.hh:110
int rjc_ion_search()
Searches for fringe peak in dtec/delay/delay-rate space.
Definition: MHO_IonosphericFringeFitterOpenMP.cc:242
std::vector< std::unique_ptr< MHO_InterpolateFringePeakOptimized > > fPerThreadPeakInterp
Definition: MHO_IonosphericFringeFitterOpenMP.hh:113
int ion_npts
Definition: MHO_IonosphericFringeFitterOpenMP.hh:102
int ion_search_smooth()
Searches for fringe peak while applying smoothing function (convolution w/ half-cosine).
Definition: MHO_IonosphericFringeFitterOpenMP.cc:685
visibility_type fVisRef
Definition: MHO_IonosphericFringeFitterOpenMP.hh:106
virtual void Accept(MHO_FringeFitterVisitor *visitor) override
Accepts and invokes a visitor to visit this object.
Definition: MHO_IonosphericFringeFitterOpenMP.hh:59
std::vector< visibility_type > fPerThreadSBD
Definition: MHO_IonosphericFringeFitterOpenMP.hh:109
MHO_IonosphericFringeFitterOpenMP(MHO_FringeData *data)
Definition: MHO_IonosphericFringeFitterOpenMP.cc:37
double fInitialSBWin[2]
Definition: MHO_IonosphericFringeFitterOpenMP.hh:101
int fNIonThreads
Definition: MHO_IonosphericFringeFitterOpenMP.hh:105
virtual ~MHO_IonosphericFringeFitterOpenMP()
Definition: MHO_IonosphericFringeFitterOpenMP.cc:44
std::vector< IonLoopResult > fIonLoopResults
Definition: MHO_IonosphericFringeFitterOpenMP.hh:116
std::vector< visibility_type > fPerThreadVis
Definition: MHO_IonosphericFringeFitterOpenMP.hh:108
void sort_tecs(int nion, std::vector< std::vector< double > > &dtec)
Sorts TEC arrays and stores them in parameter store.
Definition: MHO_IonosphericFringeFitterOpenMP.cc:645
Definition: fit_gsl.h:54
Definition: MHO_AdhocFlagging.hh:18
double famp
Definition: MHO_IonosphericFringeFitterOpenMP.hh:20
double ion_diff
Definition: MHO_IonosphericFringeFitterOpenMP.hh:21
Definition: MHO_IonosphericFringeFitterOpenMP.hh:19