casa
$Rev:20696$
|
00001 //# SelecteAverageSpwChan.h: 00002 //# Copyright (C) 2003 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 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 //#include <tables/Tables/Table.h> 00039 #include <tables/Tables/MemoryTable.h> 00040 #include <tables/Tables/TableDesc.h> 00041 #include <tables/Tables/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 <synthesis/MSVis/VisBuffer.h> 00049 #include <synthesis/MSVis/VisibilityIterator.h> 00050 #include <synthesis/MSVis/VisSet.h> 00051 00052 00053 00055 //# Start of documentation. 00056 // 00057 // <summary> 00058 // A class to select/average spectral windows and associated channels 00059 // </summary> 00060 // 00061 // <use visibility=export> 00062 // 00063 // <reviewed reviewer="Me" date="2008/07/07" tests="" demos=""> 00064 // </reviewed> 00065 00066 // <prerequisite> 00067 // <li> MeasurementSet 00068 // </prerequisite> 00069 // 00070 // <etymology> 00071 // </etymology> 00072 // 00073 // <synopsis> 00074 // </synopsis> 00075 // 00076 // <example> 00077 // </example> 00078 // 00079 // <motivation> 00080 // </motivation> 00081 // 00082 // <thrown> 00083 // <li> 00084 // <li> 00085 // </thrown> 00086 // 00087 // <todo asof="2008/07/06"> 00088 // <li> everything, and 00089 // <li> everything else 00090 // </todo> 00091 00092 //# End of documentation. 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 //selected channels 00110 Vector<Int> chans; 00111 00112 //averaged channels 00113 Vector<Double> aveFreqs; 00114 Vector<Int> aveChans; 00115 Vector<Int> sxsChans; 00116 Vector<String> aveChanNames; 00117 Matrix<Int> aveChanMaps; 00118 00119 //velocity depends on both freq and field and 00120 //can not be a member of this 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