MSSelectionTools.h

Go to the documentation of this file.
00001 //# MSSelectionTools.h: Classes to hold results from antenna grammar parser
00002 //# Copyright (C) 1994,1995,1997,1998,1999,2000,2001,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 //# $Id$
00027 
00028 #ifndef MS_MSSELECTIONTOOLS_H
00029 #define MS_MSSELECTIONTOOLS_H
00030 
00031 //# Includes
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/Arrays/Vector.h>
00034 #include <casacore/ms/MSSel/MSSelection.h>
00035 
00036 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00037 
00038   Vector<Int> set_intersection(const Vector<Int>& v1, const Vector<Int>& v2);
00039   Vector<Int> set_union(const Vector<Int>& v1, const Vector<Int>& v2);
00040 
00041   // Collective selection returning a selected MS.
00042   Bool mssSetData(const MeasurementSet& ms, 
00043                   MeasurementSet& selectedMS,
00044                   const String& outMSName="",
00045                   const String& timeExpr="",
00046                   const String& antennaExpr="",
00047                   const String& fieldExpr="",
00048                   const String& spwExpr="",
00049                   const String& uvDistExpr="",
00050                   const String& taQLExpr="",
00051                   const String& polnExpr="",
00052                   const String& scanExpr="",
00053                   const String& arrayExpr="",
00054                   const String& stateExpr="",
00055                   const String& obsExpr="",
00056                   MSSelection *mss=NULL
00057                   );
00058 
00059   // Added feedExpr
00060   Bool mssSetData2(const MeasurementSet& ms, 
00061                   MeasurementSet& selectedMS,
00062                   const String& outMSName="",
00063                   const String& timeExpr="",
00064                   const String& antennaExpr="",
00065                   const String& fieldExpr="",
00066                   const String& spwExpr="",
00067                   const String& uvDistExpr="",
00068                   const String& taQLExpr="",
00069                   const String& polnExpr="",
00070                   const String& scanExpr="",
00071                   const String& arrayExpr="",
00072                   const String& stateExpr="",
00073                   const String& obsExpr="",
00074                   const String& feedExpr="",
00075                   MSSelection *mss=NULL
00076                   );
00077 
00078 
00079   // Collective selection also returning in-row (corr/chan) slices
00080   Bool mssSetData(const MeasurementSet& ms, 
00081                   MeasurementSet& selectedMS,
00082                   Vector<Vector<Slice> >& chanSlices,
00083                   Vector<Vector<Slice> >& corrSlices,
00084                   const String& outMSName="",
00085                   const String& timeExpr="",
00086                   const String& antennaExpr="",
00087                   const String& fieldExpr="",
00088                   const String& spwExpr="",
00089                   const String& uvDistExpr="",
00090                   const String& taQLExpr="",
00091                   const String& polnExpr="",
00092                   const String& scanExpr="",
00093                   const String& arrayExpr="",
00094                   const String& stateExpr="",
00095                   const String& obsExpr="",
00096                   const Int defaultChanStep=1,
00097                   MSSelection *mss=NULL
00098                   );
00099 
00100   // Added feedExpr
00101   Bool mssSetData2(const MeasurementSet& ms, 
00102                   MeasurementSet& selectedMS,
00103                   Vector<Vector<Slice> >& chanSlices,
00104                   Vector<Vector<Slice> >& corrSlices,
00105                   const String& outMSName="",
00106                   const String& timeExpr="",
00107                   const String& antennaExpr="",
00108                   const String& fieldExpr="",
00109                   const String& spwExpr="",
00110                   const String& uvDistExpr="",
00111                   const String& taQLExpr="",
00112                   const String& polnExpr="",
00113                   const String& scanExpr="",
00114                   const String& arrayExpr="",
00115                   const String& stateExpr="",
00116                   const String& obsExpr="",
00117                   const String& feedExpr="",
00118                   const Int defaultChanStep=1,
00119                   MSSelection *mss=NULL
00120                   );
00121 
00122   Bool getSelectedTable(Table& selectedTab,     const Table& baseTab,
00123                         TableExprNode& fullTEN, const String& outName);
00124 
00125   Record mssSelectedIndices(MSSelection& mss, const MeasurementSet *ms);
00126 
00127   String stripWhite(const String& str, Bool onlyends=True);
00128   int tokenize(const String& str, const String& sep, Vector<String>& tokens,Bool upCase=False);
00129   Vector<String> &split(const String &s, char delim, Vector<String> &elems);
00130 }
00131 
00132 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1