CARMA C++
SpwBandRelationships.h
Go to the documentation of this file.
1 
11 #ifndef CARMA_SDP_SPWBANDRELATIONSHIPS_H
12 #define CARMA_SDP_SPWBANDRELATIONSHIPS_H
13 
14 // Carma includes
15 
16 // Carma tools includes
17 
18 // C++ standard library includes
19 #include <vector>
20 #include <utility>
21 
22 // Namespace using directives
23 
24 // Class definitions
25 namespace carma {
26  namespace sdp {
41  {
42  public:
45  enum SIDEBAND {
46  LSB = 0,
47  USB = 1,
48  DSB = 2};
49 
54 
58 
61  static int numSpw();
62 
65  static bool isLSB(const int& spw);
66 
69  static bool isUSB(const int& spw);
70 
73  static int matchingSbSpw(const int& spw);
74 
78  static std::vector<int> bandSbToSpw(const int& band,
79  const SIDEBAND& sideband);
80 
83  static int spwToBand(const int& spw);
84 
87  static SIDEBAND spwToSideband(const int& spw);
88 
92  static int bandSbIndex(const int& band, const SIDEBAND& sideband);
93 
96  static std::pair<int, SIDEBAND> bandSbIndexInv(const int& index);
97 
100  static int bandFreqIndex(const int& band, const SIDEBAND& sideband);
101 
104  static int sysTempIndex(const int& ant, const int& nant,
105  const int& band, const SIDEBAND& sideband);
106 
109  static int psysIndex(const int& ant, const int& nant,
110  const int& band);
111 
114  static void setNumWin(const int &num);
115 
116  private:
117 
118  static int numWin; // number of windows in data set
119  };
120  }; // namespace sdp
121 }; // namespace carma
122 
123 
124 #endif //CARMA_SDP_SPWBANDRELATIONSHIPS_H
Mapping of correlator bands and sidebands to output spectral windows.
static int bandSbIndex(const int &band, const SIDEBAND &sideband)
Map a (band,sideband) tuple to a unique sequential array index.
static int spwToBand(const int &spw)
Map a spectral window to the matching band number.
static SIDEBAND spwToSideband(const int &spw)
Map a spectral window to the matching (single) sideband.
SIDEBAND
Enumerated sideband types.
static int sysTempIndex(const int &ant, const int &nant, const int &band, const SIDEBAND &sideband)
Map a (ant,band,sideband) tuple to a systemp astro header index.
static std::vector< int > bandSbToSpw(const int &band, const SIDEBAND &sideband)
Map a (band,sideband) tuple to the matching spectral windows.
static int matchingSbSpw(const int &spw)
Return the matching sideband spw for a specified input spw.
static bool isLSB(const int &spw)
Return true if specified spectral window is LSB.
static void setNumWin(const int &num)
Set the number of windows in the data set(6 or 16)
static int psysIndex(const int &ant, const int &nant, const int &band)
Map a (ant,band) pair to a psys astro header index.
static bool isUSB(const int &spw)
Return true if specified spectral window is USB.
static int bandFreqIndex(const int &band, const SIDEBAND &sideband)
Map a (band,sideband) tuple to a bandfreq astro header index.
static int numSpw()
Return the number of output spectral windows.
static std::pair< int, SIDEBAND > bandSbIndexInv(const int &index)
Compute inverse mapping of bandSbIndex method.