00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef MS_MSSELECTIONTOOLS_H
00029 #define MS_MSSELECTIONTOOLS_H
00030
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/Arrays/Vector.h>
00034 #include <casacore/ms/MSSel/MSSelection.h>
00035
00036 namespace casacore {
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
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
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
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
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