SpectralWindow.h

Go to the documentation of this file.
00001 /*
00002  * SpectralWindow.h
00003  *
00004  *  Created on: Feb 15, 2013
00005  *      Author: jjacobs
00006  */
00007 
00008 #ifndef MSVIS_SPECTRALWINDOW_H_
00009 #define MSVIS_SPECTRALWINDOW_H_
00010 
00011 #include <casa/aipstype.h>
00012 #include <casa/BasicSL.h>
00013 #include <vector>
00014 
00015 namespace casa {
00016 
00017 template<typename T>
00018 class ArrayColumn;
00019 class MeasurementSet;
00020 
00021 namespace ms {
00022 
00023   //#warning "Needs battery of low-level tests; also needs write functionality"
00024 
00025 class SpectralChannel {
00026 
00027 public:
00028 
00029     SpectralChannel (Double frequency, Double width,
00030                      Double effectiveBandwidth, Double resolution)
00031     : effectiveBandwidth_p (effectiveBandwidth),
00032       frequency_p (frequency),
00033       resolution_p (resolution),
00034       width_p (width)
00035     {}
00036 
00037     Double effectiveBandwidth () const;
00038     Double frequency () const;
00039     Double resolution () const;
00040     Double width () const;
00041 
00042 private:
00043 
00044     Double effectiveBandwidth_p;
00045     Double frequency_p;
00046     Double resolution_p;
00047     Double width_p;
00048 
00049 };
00050 
00051 class SpectralWindow {
00052 
00053 public:
00054 
00055     typedef std::vector<SpectralChannel> Channels;
00056     typedef Channels::const_iterator const_iterator;
00057 
00058     SpectralWindow (const ROMSSpWindowColumns & columns, Int spectralWindowId);
00059 
00060     const_iterator begin () const;
00061     bool empty () const;
00062     const_iterator end () const;
00063     const SpectralChannel & get (Int i) const;
00064 
00065     Int id () const;
00066     Bool isFlagged () const;
00067     Int frequencyGroup () const;
00068     String frequencyGroupName () const;
00069     Int frequencyMeasureReference () const;
00070     Int ifConversionChain () const;
00071     String name () const;
00072     int nChannels () const;
00073     int netSideband () const;
00074     Double totalBandwidth () const;
00075     Double referenceFrequency () const;
00076 
00077 protected:
00078 
00079     void fillArrays(const ROMSSpWindowColumns & columns);
00080     Vector<Double> getArray (const ArrayColumn<Double> & arrayColumn);
00081     void fillScalars (const ROMSSpWindowColumns & columns);
00082     template<typename T>
00083     T getScalar (const ScalarColumn<T> & column);
00084 
00085 private:
00086 
00087     Channels channels_p;
00088     Bool flagged_p;
00089     Int frequencyGroup_p;
00090     String frequencyGroupName_p;
00091     Int frequencyMeasureReference_p;
00092     Int id_p;
00093     Int ifConversionChain_p;
00094     String name_p;
00095     int nChannels_p;
00096     int netSideband_p;
00097     Double totalBandwidth_p;
00098     Double referenceFrequency_p;
00099 };
00100 
00101 class SpectralWindows {
00102 
00103 public:
00104 
00105     typedef std::vector<SpectralWindow> Windows;
00106     typedef Windows::const_iterator const_iterator;
00107 
00108     SpectralWindows (const MeasurementSet * ms);
00109 
00110     const_iterator begin () const;
00111     bool empty () const;
00112     const_iterator end () const;
00113     const SpectralWindow & get (Int id) const;
00114     size_t size () const;
00115 
00116 protected:
00117 
00118 private:
00119 
00120     Windows windows_p;
00121 };
00122 
00123 } // end namespace vi
00124 } // end namespace casa
00125 
00126 
00127 
00128 #endif /* SPECTRALWINDOW_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1