HOPS
HOPS class reference
MHO_DiFXVisibilityProcessor.hh
Go to the documentation of this file.
1 #ifndef MHO_DiFXVisibilityProcessor_HH__
2 #define MHO_DiFXVisibilityProcessor_HH__
3 
4 #include <fstream>
5 #include <map>
6 #include <set>
7 #include <string>
8 #include <utility>
9 #include <vector>
10 
13 #include "MHO_Message.hh"
14 
15 namespace hops
16 {
17 
32 {
33  public:
36 
42  void SetFilename(std::string filename) { fFilename = filename.c_str(); }
43 
44  //needed for processing!
50  void SetDiFXInputData(const mho_json* input) { fInput = input; }
51 
58  void ReadDIFXFile(std::map< int, MHO_DiFXBaselineProcessor >& allBaselineVisibilities);
59 
65  void SetFrequencyBands(std::vector< std::tuple< std::string, double, double > > fbands) { fFreqBands = fbands; }
66 
72  void SetFreqGroups(std::vector< std::string > fgroups) { fOnlyFreqGroups = fgroups; }
73 
79  void SetOnlyBandwidth(double bw)
80  {
81  fOnlyBandwidth = bw;
82  fSelectByBandwidth = true;
83  }
84 
85  void SetZoomFreqIndices(const std::set< int >& zoom_indices) { fZoomFreqIndices = zoom_indices; }
86 
87  private:
88  const mho_json* fInput;
89 
90  std::string fFilename;
91  //maps the pair(baseline,freqindex) to the number of channels (# of spectral points)
92  std::map< std::pair< int, int >, int > fNChannelsMap;
93 
94  std::vector< std::tuple< std::string, double, double > >
95  fFreqBands; //frequency band/group labels and ranges (code, flow, fhigh)
96  std::vector< std::string > fOnlyFreqGroups; //limit output to matching frequency groups
97  bool fSelectByBandwidth;
98  double fOnlyBandwidth; //limit output to only channels of this bandwidth
99  std::set< int > fZoomFreqIndices; //when non-empty, discard records not in this set (keeps root/vis consistent)
100 };
101 
102 } // namespace hops
103 
104 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_DiFXVisibilityProcessor.
Definition: MHO_DiFXVisibilityProcessor.hh:32
void ReadDIFXFile(std::map< int, MHO_DiFXBaselineProcessor > &allBaselineVisibilities)
read the visibilities from Swinburne file and allocate memory to store them as we go memory managemen...
Definition: MHO_DiFXVisibilityProcessor.cc:21
void SetFreqGroups(std::vector< std::string > fgroups)
Setter for (allowed) freq groups/bands.
Definition: MHO_DiFXVisibilityProcessor.hh:72
void SetFrequencyBands(std::vector< std::tuple< std::string, double, double > > fbands)
Setter for frequency bands (label, limits)
Definition: MHO_DiFXVisibilityProcessor.hh:65
virtual ~MHO_DiFXVisibilityProcessor()
Definition: MHO_DiFXVisibilityProcessor.hh:35
void SetOnlyBandwidth(double bw)
Setter for allow channel bandwidth (only channels with this bandwidth will be kept)
Definition: MHO_DiFXVisibilityProcessor.hh:79
void SetDiFXInputData(const mho_json *input)
Setter for difx .input data.
Definition: MHO_DiFXVisibilityProcessor.hh:50
MHO_DiFXVisibilityProcessor()
Definition: MHO_DiFXVisibilityProcessor.cc:10
void SetZoomFreqIndices(const std::set< int > &zoom_indices)
Definition: MHO_DiFXVisibilityProcessor.hh:85
void SetFilename(std::string filename)
Setter for filename.
Definition: MHO_DiFXVisibilityProcessor.hh:42
Definition: difx2mark4.h:111
Definition: MHO_AdhocFlagging.hh:18