HOPS
HOPS class reference
MHO_DiFXChannelNameConstructor.hh
Go to the documentation of this file.
1 #ifndef MHO_DiFXChannelNameConstructor_HH__
2 #define MHO_DiFXChannelNameConstructor_HH__
3 
4 #include <map>
5 #include <sstream>
6 #include <string>
7 #include <vector>
8 
10 #include "MHO_Message.hh"
11 
12 namespace hops
13 {
14 
28 {
29  public:
32 
40  void AddBandLabel(std::string band_label, double freq_low, double freq_high);
41 
47  void AddChannelNames(mho_json& vex_root);
48 
57  void SetScanName(std::string scan_id) { fScanID = scan_id; }
58 
59  private:
66  std::string BandLabelFromSkyFreq(double sky_freq);
73  std::size_t FindChannelIndex(double sky_freq);
74 
78  struct band_range
79  {
80  double fLow;
81  double fHigh;
82  std::string fLabel;
83  };
84 
85  std::vector< band_range > fBandRangeLabels;
86  std::string fScanID;
87 
88  double fChanTol; //tolerance for labeling disinct frequencies
89  std::vector< double > fOrderedSkyFrequencies;
90 };
91 
92 } // namespace hops
93 
94 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_DiFXChannelNameConstructor.
Definition: MHO_DiFXChannelNameConstructor.hh:28
void AddChannelNames(mho_json &vex_root)
Adds channel names to VEX experiment data based on scan and mode information.
Definition: MHO_DiFXChannelNameConstructor.cc:27
void AddBandLabel(std::string band_label, double freq_low, double freq_high)
Adds a frequency range for a specific band label.
Definition: MHO_DiFXChannelNameConstructor.cc:17
void SetScanName(std::string scan_id)
Setter for scan name if the (o)vex file has more than one scan, we may want to specify a specific one...
Definition: MHO_DiFXChannelNameConstructor.hh:57
virtual ~MHO_DiFXChannelNameConstructor()
Definition: MHO_DiFXChannelNameConstructor.cc:14
MHO_DiFXChannelNameConstructor()
Definition: MHO_DiFXChannelNameConstructor.cc:8
Definition: MHO_ChannelLabeler.hh:17