casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpectralWindow.h
Go to the documentation of this file.
1 /*
2  * SpectralWindow.h
3  *
4  * Created on: Feb 15, 2013
5  * Author: jjacobs
6  */
7 
8 #ifndef MSVIS_SPECTRALWINDOW_H_
9 #define MSVIS_SPECTRALWINDOW_H_
10 
11 #include <casa/aipstype.h>
12 #include <casa/BasicSL.h>
13 #include <vector>
14 
15 namespace casacore{
16 
17 template<typename T> class ArrayColumn;
18 class MeasurementSet;
19 }
20 
21 namespace casa {
22 
23 namespace ms {
24 
25  //#warning "Needs battery of low-level tests; also needs write functionality"
26 
28 
29 public:
30 
33  : effectiveBandwidth_p (effectiveBandwidth),
34  frequency_p (frequency),
35  resolution_p (resolution),
36  width_p (width)
37  {}
38 
40  casacore::Double frequency () const;
42  casacore::Double width () const;
43 
44 private:
45 
50 
51 };
52 
54 
55 public:
56 
57  typedef std::vector<SpectralChannel> Channels;
59 
60  SpectralWindow (const casacore::ROMSSpWindowColumns & columns, casacore::Int spectralWindowId);
61 
62  const_iterator begin () const;
63  bool empty () const;
64  const_iterator end () const;
65  const SpectralChannel & get (casacore::Int i) const;
66 
67  casacore::Int id () const;
68  casacore::Bool isFlagged () const;
73  casacore::String name () const;
74  int nChannels () const;
75  int netSideband () const;
78 
79 protected:
80 
81  void fillArrays(const casacore::ROMSSpWindowColumns & columns);
83  void fillScalars (const casacore::ROMSSpWindowColumns & columns);
84  template<typename T>
85  T getScalar (const casacore::ScalarColumn<T> & column);
86 
87 private:
88 
101 };
102 
104 
105 public:
106 
107  typedef std::vector<SpectralWindow> Windows;
109 
111 
112  const_iterator begin () const;
113  bool empty () const;
114  const_iterator end () const;
115  const SpectralWindow & get (casacore::Int id) const;
116  size_t size () const;
117 
118 protected:
119 
120 private:
121 
123 };
124 
125 } // end namespace vi
126 
127 } // end namespace casa
128 
129 #endif /* SPECTRALWINDOW_H_ */
SpectralChannel(casacore::Double frequency, casacore::Double width, casacore::Double effectiveBandwidth, casacore::Double resolution)
const_iterator end() const
int Int
Definition: aipstype.h:50
casacore::Double totalBandwidth_p
casacore::Double resolution_p
Elements::const_iterator const_iterator
casacore::Double frequency_p
casacore::Double effectiveBandwidth() const
const_iterator begin() const
casacore::Double referenceFrequency() const
casacore::Double width_p
casacore::Double width() const
casacore::Double frequency() const
casacore::Bool flagged_p
casacore::Int frequencyGroup_p
casacore::Vector< casacore::Double > getArray(const casacore::ArrayColumn< casacore::Double > &arrayColumn)
const_iterator end() const
const_iterator begin() const
A class to provide easy read-only access to MSASpectralWindow columns.
casacore::String frequencyGroupName_p
casacore::Double referenceFrequency_p
casacore::Int ifConversionChain() const
casacore::String frequencyGroupName() const
casacore::Double resolution() const
void fillArrays(const casacore::ROMSSpWindowColumns &columns)
casacore::Bool isFlagged() const
SpectralWindow(const casacore::ROMSSpWindowColumns &columns, casacore::Int spectralWindowId)
std::vector< SpectralWindow > Windows
casacore::Int frequencyMeasureReference_p
casacore::Int frequencyMeasureReference() const
double Double
Definition: aipstype.h:55
casacore::Int id() const
casacore::Double effectiveBandwidth_p
SpectralWindows(const casacore::MeasurementSet *ms)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
A Table intended to hold astronomical data (a set of Measurements).
std::vector< SpectralChannel > Channels
casacore::Int frequencyGroup() const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Windows::const_iterator const_iterator
Channels::const_iterator const_iterator
casacore::String name() const
casacore::String name_p
Access to a scalar table column with arbitrary data type.
Definition: MSFitsOutput.h:41
casacore::Double totalBandwidth() const
casacore::Int ifConversionChain_p
void fillScalars(const casacore::ROMSSpWindowColumns &columns)
T getScalar(const casacore::ScalarColumn< T > &column)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42