casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef MS_MSSELECTIONTOOLS_H
27#define MS_MSSELECTIONTOOLS_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/Vector.h>
32#include <casacore/ms/MSSel/MSSelection.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// Get the intersection or union of IDs (such as FieldId).
39
40// Collective selection returning a selected MS.
41Bool mssSetData(const MeasurementSet& ms, MeasurementSet& selectedMS, const String& outMSName = "",
42 const String& timeExpr = "", const String& antennaExpr = "",
43 const String& fieldExpr = "", const String& spwExpr = "",
44 const String& uvDistExpr = "", const String& taQLExpr = "",
45 const String& polnExpr = "", const String& scanExpr = "",
46 const String& arrayExpr = "", const String& stateExpr = "",
47 const String& obsExpr = "", MSSelection* mss = NULL);
48
49// Added feedExpr
50Bool mssSetData2(const MeasurementSet& ms, MeasurementSet& selectedMS, const String& outMSName = "",
51 const String& timeExpr = "", const String& antennaExpr = "",
52 const String& fieldExpr = "", const String& spwExpr = "",
53 const String& uvDistExpr = "", const String& taQLExpr = "",
54 const String& polnExpr = "", const String& scanExpr = "",
55 const String& arrayExpr = "", const String& stateExpr = "",
56 const String& obsExpr = "", const String& feedExpr = "", MSSelection* mss = NULL);
57
58// Collective selection also returning in-row (corr/chan) slices
60 Vector<Vector<Slice>>& chanSlices, Vector<Vector<Slice>>& corrSlices,
61 const String& outMSName = "", const String& timeExpr = "",
62 const String& antennaExpr = "", const String& fieldExpr = "",
63 const String& spwExpr = "", const String& uvDistExpr = "",
64 const String& taQLExpr = "", const String& polnExpr = "",
65 const String& scanExpr = "", const String& arrayExpr = "",
66 const String& stateExpr = "", const String& obsExpr = "",
67 const Int defaultChanStep = 1, MSSelection* mss = NULL);
68
69// Added feedExpr
71 Vector<Vector<Slice>>& chanSlices, Vector<Vector<Slice>>& corrSlices,
72 const String& outMSName = "", const String& timeExpr = "",
73 const String& antennaExpr = "", const String& fieldExpr = "",
74 const String& spwExpr = "", const String& uvDistExpr = "",
75 const String& taQLExpr = "", const String& polnExpr = "",
76 const String& scanExpr = "", const String& arrayExpr = "",
77 const String& stateExpr = "", const String& obsExpr = "",
78 const String& feedExpr = "", const Int defaultChanStep = 1,
79 MSSelection* mss = NULL);
80
81Bool getSelectedTable(Table& selectedTab, const Table& baseTab, TableExprNode& fullTEN,
82 const String& outName);
83
85
86String stripWhite(const String& str, Bool onlyends = True);
87int tokenize(const String& str, const String& sep, Vector<String>& tokens, Bool upCase = False);
88Vector<String>& split(const String& s, char delim, Vector<String>& elems);
89} // namespace casacore
90
91#endif
String: the storage and methods of handling collections of characters.
Definition String.h:355
int split(const std::string &str, std::string res[], int maxn, const std::string &sep)
Splitting Global function which splits the String into string array res at separator and returns the ...
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
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.
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)
Vector< Int > set_intersection(const Vector< Int > &v1, const Vector< Int > &v2)
Get the intersection or union of IDs (such as FieldId).
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:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
Vector< Int > set_union(const Vector< Int > &v1, const Vector< Int > &v2)
const Bool True
Definition aipstype.h:41
Record mssSelectedIndices(MSSelection &mss, const MeasurementSet *ms)