SelectAverageSpw.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 #if !defined SAS_H
00032 #define SAS_H
00033 
00034 
00035 #include <casa/aips.h>
00036 
00037 #include <tables/Tables/SetupNewTab.h>
00038 
00039 #include <tables/Tables/MemoryTable.h>
00040 #include <tables/Tables/TableDesc.h>
00041 #include <tables/DataMan/StManAipsIO.h>
00042 
00043 #include <ms/MeasurementSets/MSColumns.h>
00044 #include <ms/MeasurementSets/MeasurementSet.h>
00045 
00046 #include <casa/Containers/List.h>
00047 
00048 #include <msvis/MSVis/VisBuffer.h>
00049 #include <msvis/MSVis/VisibilityIterator.h>
00050 #include <msvis/MSVis/VisSet.h>
00051 
00052 
00053 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00094 
00095 namespace casa {
00096 
00097 class SelectAverageSpw;
00098 
00099 typedef SelectAverageSpw SAS;
00100 
00101 class SelectAverageSpw
00102 {
00103 public:
00104    Int spwid;
00105    Int desc;
00106    Double rFreq;
00107    Int measFreqRef;
00108 
00109    
00110    Vector<Int> chans;
00111 
00112    
00113    Vector<Double> aveFreqs;
00114    Vector<Int> aveChans;
00115    Vector<Int> sxsChans;
00116    Vector<String> aveChanNames; 
00117    Matrix<Int> aveChanMaps; 
00118 
00119    
00120    
00121 
00122 
00123    static Int nextSelected(Int spw, Int currId, Matrix<Int>& cList);
00124    static Int selectAverageChan(MS*, const Matrix<Int>& chanList,
00125                                 Vector<SAS>& sp, const Int& aveChan = 1);
00126    static void averageVelocity(Bool &sorry,
00127                                MS*, Vector<SAS>& sp, Vector<Double>& velo,
00128                                const Int& spwidx, const Int& filed = 0,
00129                                const String& restfreq = "",
00130                                const String& frame = "",
00131                                const String& doppler = "");
00132    static void showSASC(const Vector<SAS>& sp);
00133    static void chanMap(Matrix<Int>& cmap, const Vector<SAS>& sp);
00134    static void showSASC();
00135    static Int descBySpw(const Int& spid, const Vector<SAS>& sp);
00136    static Int spwByDesc(const Int& desc, const Vector<SAS>& sp);
00137    static Int spwIndexByDesc(const Int& desc, const Vector<SAS>& sp);
00138    static Int spwIndexBySpw(const Int& spid, const Vector<SAS>& sp);
00139 
00140    static const Int maxChan;
00141 
00142   
00143 };
00144 
00145 
00146 } 
00147 #endif
00148 
00149