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 
52 
59  void ReadDIFXFile(std::map< int, MHO_DiFXBaselineProcessor >& allBaselineVisibilities);
60 
66  void SetFrequencyBands(std::vector< std::tuple< std::string, double, double > > fbands) { fFreqBands = fbands; }
67 
73  void SetFreqGroups(std::vector< std::string > fgroups) { fOnlyFreqGroups = fgroups; }
74 
80  void SetOnlyBandwidth(double bw)
81  {
82  fOnlyBandwidth = bw;
83  fSelectByBandwidth = true;
84  }
85 
86  private:
87  const mho_json* fInput;
88 
89  std::string fFilename;
90  //maps the pair(baseline,freqindex) to the number of channels (# of spectral points)
91  std::map< std::pair< int, int >, int > fNChannelsMap;
92 
93  std::vector< std::tuple< std::string, double, double > >
94  fFreqBands; //frequency band/group labels and ranges (code, flow, fhigh)
95  std::vector< std::string > fOnlyFreqGroups; //limit output to matching frequency groups
96  bool fSelectByBandwidth;
97  double fOnlyBandwidth; //limit output to only channels of this bandwidth
98 };
99 
100 } // namespace hops
101 
102 #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:18
void SetFreqGroups(std::vector< std::string > fgroups)
Setter for (allowed) freq groups/bands.
Definition: MHO_DiFXVisibilityProcessor.hh:73
void SetFrequencyBands(std::vector< std::tuple< std::string, double, double > > fbands)
Setter for frequency bands (label, limits)
Definition: MHO_DiFXVisibilityProcessor.hh:66
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:80
void SetDiFXInputData(const mho_json *input)
Setter for difx .input data.
Definition: MHO_DiFXVisibilityProcessor.hh:50
MHO_DiFXVisibilityProcessor()
Definition: MHO_DiFXVisibilityProcessor.cc:8
void SetFilename(std::string filename)
Setter for filename.
Definition: MHO_DiFXVisibilityProcessor.hh:42
Definition: difx2mark4.h:111
Definition: MHO_ChannelLabeler.hh:17