casacore
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>
33 #include <casacore/casa/Arrays/Vector.h>
34 #include <casacore/ms/MSSel/MSSelection.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38  // Get the intersection or union of IDs (such as FieldId).
41 
42  // Collective selection returning a selected MS.
44  MeasurementSet& selectedMS,
45  const String& outMSName="",
46  const String& timeExpr="",
47  const String& antennaExpr="",
48  const String& fieldExpr="",
49  const String& spwExpr="",
50  const String& uvDistExpr="",
51  const String& taQLExpr="",
52  const String& polnExpr="",
53  const String& scanExpr="",
54  const String& arrayExpr="",
55  const String& stateExpr="",
56  const String& obsExpr="",
57  MSSelection *mss=NULL
58  );
59 
60  // Added feedExpr
62  MeasurementSet& selectedMS,
63  const String& outMSName="",
64  const String& timeExpr="",
65  const String& antennaExpr="",
66  const String& fieldExpr="",
67  const String& spwExpr="",
68  const String& uvDistExpr="",
69  const String& taQLExpr="",
70  const String& polnExpr="",
71  const String& scanExpr="",
72  const String& arrayExpr="",
73  const String& stateExpr="",
74  const String& obsExpr="",
75  const String& feedExpr="",
76  MSSelection *mss=NULL
77  );
78 
79 
80  // Collective selection also returning in-row (corr/chan) slices
82  MeasurementSet& selectedMS,
83  Vector<Vector<Slice> >& chanSlices,
84  Vector<Vector<Slice> >& corrSlices,
85  const String& outMSName="",
86  const String& timeExpr="",
87  const String& antennaExpr="",
88  const String& fieldExpr="",
89  const String& spwExpr="",
90  const String& uvDistExpr="",
91  const String& taQLExpr="",
92  const String& polnExpr="",
93  const String& scanExpr="",
94  const String& arrayExpr="",
95  const String& stateExpr="",
96  const String& obsExpr="",
97  const Int defaultChanStep=1,
98  MSSelection *mss=NULL
99  );
100 
101  // Added feedExpr
103  MeasurementSet& selectedMS,
104  Vector<Vector<Slice> >& chanSlices,
105  Vector<Vector<Slice> >& corrSlices,
106  const String& outMSName="",
107  const String& timeExpr="",
108  const String& antennaExpr="",
109  const String& fieldExpr="",
110  const String& spwExpr="",
111  const String& uvDistExpr="",
112  const String& taQLExpr="",
113  const String& polnExpr="",
114  const String& scanExpr="",
115  const String& arrayExpr="",
116  const String& stateExpr="",
117  const String& obsExpr="",
118  const String& feedExpr="",
119  const Int defaultChanStep=1,
120  MSSelection *mss=NULL
121  );
122 
123  Bool getSelectedTable(Table& selectedTab, const Table& baseTab,
124  TableExprNode& fullTEN, const String& outName);
125 
127 
128  String stripWhite(const String& str, Bool onlyends=True);
129  int tokenize(const String& str, const String& sep, Vector<String>& tokens,Bool upCase=False);
130  Vector<String> &split(const String &s, char delim, Vector<String> &elems);
131 }
132 
133 #endif
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
Vector< String > & split(const String &s, char delim, Vector< String > &elems)
const Bool False
Definition: aipstype.h:44
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)
Get the intersection or union of IDs (such as FieldId).
int tokenize(const String &str, const String &sep, Vector< String > &tokens, Bool upCase=False)
Bool getSelectedTable(Table &selectedTab, const Table &baseTab, TableExprNode &fullTEN, const String &outName)
String stripWhite(const String &str, Bool onlyends=True)
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.
int Int
Definition: aipstype.h:50
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const Bool True
Definition: aipstype.h:43
Record mssSelectedIndices(MSSelection &mss, const MeasurementSet *ms)