casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SelectAverageSpw.h
Go to the documentation of this file.
1 //# SelecteAverageSpwChan.h:
2 //# Copyright (C) 2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //#
28 //# -------------------------------------------------------------------------
29 
30 
31 #if !defined SAS_H
32 #define SAS_H
33 
34 
35 #include <casa/aips.h>
36 
38 //#include <tables/Tables/Table.h>
42 
45 
46 #include <list>
47 
48 #include <msvis/MSVis/VisBuffer.h>
50 #include <msvis/MSVis/VisSet.h>
51 
52 
53 
55 //# Start of documentation.
56 //
57 // <summary>
58 // A class to select/average spectral windows and associated channels
59 // </summary>
60 //
61 // <use visibility=export>
62 //
63 // <reviewed reviewer="Me" date="2008/07/07" tests="" demos="">
64 // </reviewed>
65 
66 // <prerequisite>
67 // <li> MeasurementSet
68 // </prerequisite>
69 //
70 // <etymology>
71 // </etymology>
72 //
73 // <synopsis>
74 // </synopsis>
75 //
76 // <example>
77 // </example>
78 //
79 // <motivation>
80 // </motivation>
81 //
82 // <thrown>
83 // <li>
84 // <li>
85 // </thrown>
86 //
87 // <todo asof="2008/07/06">
88 // <li> everything, and
89 // <li> everything else
90 // </todo>
91 
92 //# End of documentation.
94 
95 namespace casa {
96 
98 
99 typedef SelectAverageSpw SAS;
100 
102 {
103 public:
108 
109  //selected channels
111 
112  //averaged channels
118 
119  //velocity depends on both freq and field and
120  //can not be a member of this
121 
122 
123  static casacore::Int nextSelected(casacore::Int spw, casacore::Int currId, casacore::Matrix<casacore::Int>& cList);
124  static casacore::Int selectAverageChan(casacore::MS*, const casacore::Matrix<casacore::Int>& chanList,
125  casacore::Vector<SAS>& sp, const casacore::Int& aveChan = 1);
126  static void averageVelocity(casacore::Bool &sorry,
128  const casacore::Int& spwidx, const casacore::Int& filed = 0,
129  const casacore::String& restfreq = "",
130  const casacore::String& frame = "",
131  const casacore::String& doppler = "");
132  static void showSASC(const casacore::Vector<SAS>& sp);
133  static void chanMap(casacore::Matrix<casacore::Int>& cmap, const casacore::Vector<SAS>& sp);
134  static void showSASC();
135  static casacore::Int descBySpw(const casacore::Int& spid, const casacore::Vector<SAS>& sp);
136  static casacore::Int spwByDesc(const casacore::Int& desc, const casacore::Vector<SAS>& sp);
137  static casacore::Int spwIndexByDesc(const casacore::Int& desc, const casacore::Vector<SAS>& sp);
138  static casacore::Int spwIndexBySpw(const casacore::Int& spid, const casacore::Vector<SAS>& sp);
139 
140  static const casacore::Int maxChan;
141 
142 
143 };
144 
145 
146 }
147 #endif
148 
149 
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > aveChans
SelectAverageSpw SAS
static const casacore::Int maxChan
casacore::Matrix< casacore::Int > aveChanMaps
casacore::Vector< casacore::String > aveChanNames
double Double
Definition: aipstype.h:55
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Vector< casacore::Int > sxsChans
A Table intended to hold astronomical data (a set of Measurements).
casacore::Vector< casacore::Int > chans
selected channels
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Vector< casacore::Double > aveFreqs
averaged channels
casacore::Double rFreq