casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSSelectionTools.h
Go to the documentation of this file.
1 //# MSSelectionTools.h: Classes to hold results from antenna grammar parser
2 //# Copyright (C) 1994,1995,1997,1998,1999,2000,2001,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 //# $Id$
27 
28 #ifndef MS_MSSELECTIONTOOLS_H
29 #define MS_MSSELECTIONTOOLS_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38  Vector<Int> set_intersection(const Vector<Int>& v1, const Vector<Int>& v2);
39  Vector<Int> set_union(const Vector<Int>& v1, const Vector<Int>& v2);
40 
41  // Collective selection returning a selected MS.
42  Bool mssSetData(const MeasurementSet& ms,
43  MeasurementSet& selectedMS,
44  const String& outMSName="",
45  const String& timeExpr="",
46  const String& antennaExpr="",
47  const String& fieldExpr="",
48  const String& spwExpr="",
49  const String& uvDistExpr="",
50  const String& taQLExpr="",
51  const String& polnExpr="",
52  const String& scanExpr="",
53  const String& arrayExpr="",
54  const String& stateExpr="",
55  const String& obsExpr="",
56  MSSelection *mss=NULL
57  );
58 
59  // Added feedExpr
60  Bool mssSetData2(const MeasurementSet& ms,
61  MeasurementSet& selectedMS,
62  const String& outMSName="",
63  const String& timeExpr="",
64  const String& antennaExpr="",
65  const String& fieldExpr="",
66  const String& spwExpr="",
67  const String& uvDistExpr="",
68  const String& taQLExpr="",
69  const String& polnExpr="",
70  const String& scanExpr="",
71  const String& arrayExpr="",
72  const String& stateExpr="",
73  const String& obsExpr="",
74  const String& feedExpr="",
75  MSSelection *mss=NULL
76  );
77 
78 
79  // Collective selection also returning in-row (corr/chan) slices
80  Bool mssSetData(const MeasurementSet& ms,
81  MeasurementSet& selectedMS,
82  Vector<Vector<Slice> >& chanSlices,
83  Vector<Vector<Slice> >& corrSlices,
84  const String& outMSName="",
85  const String& timeExpr="",
86  const String& antennaExpr="",
87  const String& fieldExpr="",
88  const String& spwExpr="",
89  const String& uvDistExpr="",
90  const String& taQLExpr="",
91  const String& polnExpr="",
92  const String& scanExpr="",
93  const String& arrayExpr="",
94  const String& stateExpr="",
95  const String& obsExpr="",
96  const Int defaultChanStep=1,
97  MSSelection *mss=NULL
98  );
99 
100  // Added feedExpr
101  Bool mssSetData2(const MeasurementSet& ms,
102  MeasurementSet& selectedMS,
103  Vector<Vector<Slice> >& chanSlices,
104  Vector<Vector<Slice> >& corrSlices,
105  const String& outMSName="",
106  const String& timeExpr="",
107  const String& antennaExpr="",
108  const String& fieldExpr="",
109  const String& spwExpr="",
110  const String& uvDistExpr="",
111  const String& taQLExpr="",
112  const String& polnExpr="",
113  const String& scanExpr="",
114  const String& arrayExpr="",
115  const String& stateExpr="",
116  const String& obsExpr="",
117  const String& feedExpr="",
118  const Int defaultChanStep=1,
119  MSSelection *mss=NULL
120  );
121 
122  Bool getSelectedTable(Table& selectedTab, const Table& baseTab,
123  TableExprNode& fullTEN, const String& outName);
124 
125  Record mssSelectedIndices(MSSelection& mss, const MeasurementSet *ms);
126 
127  String stripWhite(const String& str, Bool onlyends=True);
128  int tokenize(const String& str, const String& sep, Vector<String>& tokens,Bool upCase=False);
129  Vector<String> &split(const String &s, char delim, Vector<String> &elems);
130 }
131 
132 #endif
Bool mssSetData2(const MeasurementSet &ms, MeasurementSet &selectedMS, const String &outMSName="", const String &timeExpr="", const String &antennaExpr="", const String &fieldExpr="", const String &spwExpr="", const String &uvDistExpr="", const String &taQLExpr="", const String &polnExpr="", const String &scanExpr="", const String &arrayExpr="", const String &stateExpr="", const String &obsExpr="", const String &feedExpr="", MSSelection *mss=NULL)
Added feedExpr.
Bool getSelectedTable(Table &selectedTab, const Table &baseTab, TableExprNode &fullTEN, const String &outName)
int Int
Definition: aipstype.h:50
std::vector< double > Vector
Definition: ds9context.h:24
Vector< Int > set_union(const Vector< Int > &v1, const Vector< Int > &v2)
Bool mssSetData(const MeasurementSet &ms, MeasurementSet &selectedMS, const String &outMSName="", const String &timeExpr="", const String &antennaExpr="", const String &fieldExpr="", const String &spwExpr="", const String &uvDistExpr="", const String &taQLExpr="", const String &polnExpr="", const String &scanExpr="", const String &arrayExpr="", const String &stateExpr="", const String &obsExpr="", MSSelection *mss=NULL)
Collective selection returning a selected MS.
Vector< Int > set_intersection(const Vector< Int > &v1, const Vector< Int > &v2)
String stripWhite(const String &str, Bool onlyends=True)
int tokenize(const String &str, const String &sep, Vector< String > &tokens, Bool upCase=False)
Vector< String > & split(const String &s, char delim, Vector< String > &elems)
Record mssSelectedIndices(MSSelection &mss, const MeasurementSet *ms)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const Bool False
Definition: aipstype.h:44
const Bool True
Definition: aipstype.h:43
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42