casa
$Rev:20696$
|
00001 //# MSAntennaIndex: index or lookup in a MeasurementSet ANTENNA subtable 00002 //# Copyright (C) 2000,2001,2002 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 //# 00027 //# $Id: MSAntennaIndex.h 20266 2008-02-26 00:43:05Z gervandiepen $ 00028 00029 #ifndef MS_MSANTENNAINDEX_H 00030 #define MS_MSANTENNAINDEX_H 00031 00032 //# includes 00033 #include <casa/aips.h> 00034 #include <ms/MeasurementSets/MSAntenna.h> 00035 #include <ms/MeasurementSets/MSAntennaColumns.h> 00036 #include <casa/Arrays/Vector.h> 00037 #include <casa/BasicSL/String.h> 00038 00039 namespace casa { //# NAMESPACE CASA - BEGIN 00040 00041 //# forward declarations 00042 00043 // <summary> 00044 // Class to handle lookup or indexing into a MS ANTENNA subtable 00045 // </summary> 00046 00047 // <use visibility=export> 00048 // 00049 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00050 // </reviewed> 00051 00052 // <prerequisite> 00053 // <li> MeasurementSet 00054 // <li> MSAntenna 00055 // </prerequisite> 00056 // 00057 // <etymology> 00058 // From "MeasurementSet", "ANTENNA subtable" and "index". 00059 // </etymology> 00060 // 00061 // <synopsis> 00062 // This class provides lookup and indexing into an MS ANTENNA 00063 // subtable. These services include returning rows numbers 00064 // (which for the ANTENNA subtable are ANTENNA_ID's) associated 00065 // with specific data in the subtable. 00066 // </synopsis> 00067 // 00068 // <example> 00069 // </example> 00070 // 00071 // <motivation> 00072 // Collect together all subtable indexing and lookup for the 00073 // ANTENNA subtable, for encapsulation and efficiency. 00074 // </motivation> 00075 // 00076 // <thrown> 00077 // <li> 00078 // <li> 00079 // </thrown> 00080 // 00081 00082 class MSAntennaIndex 00083 { 00084 public: 00085 // Construct from an MS ANTENNA subtable 00086 MSAntennaIndex(const MSAntenna &antenna); 00087 00088 // Null destructor 00089 virtual ~MSAntennaIndex() {}; 00090 00091 // Look up ANTENNA_ID's for a given a regular expression or pattern 00092 Vector<Int> matchAntennaRegexOrPattern(const String& pattern, const Bool regex=False); 00093 // Look up ANTENNA_ID's for a given antenna name, or set of antenna names 00094 Vector<Int> matchAntennaName(const String& name); 00095 Vector<Int> matchAntennaName(const Vector<String>& names); 00096 00097 // Look up ANTENNA_ID's for a given antenna station 00098 Vector<Int> matchStationRegexOrPattern(const String& pattern, const Bool regex=False); 00099 Vector<Int> matchStationName(const String& station); 00100 Vector<Int> matchStationName(const Vector<String>& station); 00101 00102 // Look up ANTENNA_ID's for a given antenna and station name pair 00103 Vector<Int> matchAntennaNameAndStation(const String& name, 00104 const String& station); 00105 00106 Vector<Int> matchId(const Vector<Int>& sourceId); 00107 private: 00108 // Default constructor 00109 MSAntennaIndex(); 00110 // ANTENNA subtable column accessor 00111 ROMSAntennaColumns msAntennaCols_p; 00112 00113 // Vector cache of antenna id's 00114 Vector<Int> antennaIds_p, stationIds_p; 00115 Int nrows_p; 00116 }; 00117 00118 00119 } //# NAMESPACE CASA - END 00120 00121 #endif 00122