casacore
Loading...
Searching...
No Matches
MSFeedIndex.h
Go to the documentation of this file.
1//# MSFeedIndex: index into a MeasurementSet FEED subtable
2//# Copyright (C) 2000,2001,2002
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//#
27//# $Id$
28
29#ifndef MS_MSFEEDINDEX_H
30#define MS_MSFEEDINDEX_H
31
32#include <casacore/casa/aips.h>
33#include <casacore/ms/MSSel/MSTableIndex.h>
34
35#include <casacore/ms/MeasurementSets/MSFeedColumns.h>
36#include <casacore/casa/Containers/RecordField.h>
37
38namespace casacore { //# NAMESPACE CASACORE - BEGIN
39
40//# forward declarations
41class MSFeed;
42
43// <summary>
44// </summary>
45
46// <use visibility=export>
47
48// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
49// </reviewed>
50
51// <prerequisite>
52// <li> MeasurementSet
53// <li> MSTableIndex
54// </prerequisite>
55//
56// <etymology>
57// </etymology>
58//
59// <synopsis>
60// </synopsis>
61//
62// <example>
63// </example>
64//
65// <motivation>
66// </motivation>
67//
68// <thrown>
69// <li>
70// <li>
71// </thrown>
72//
73
75{
76public:
77 // no index attached, use the attach function or assignment operator to change that
79
80 // construct one using the indicated FEED table
81 MSFeedIndex(const MSFeed &feed);
82
83 // construct one from another
84 MSFeedIndex(const MSFeedIndex &other);
85
86 virtual ~MSFeedIndex();
87
89
90 void attach(const MSFeed &feed);
91
92 // access to the antenna ID key, throws an exception if isNull() is False
94
95 // access to the feed ID key, throws an exception if isNull() is False
96 Int &feedId() {return *feedId_p;}
97
98 // access to the spectral window ID key, throws an exception if isNull() is False
100
101 // return feed id.'s (and associated row numbers) for a given antenna id.,
102 // polzn type and receptor angle
104 const Vector<String>& polznType,
105 const Vector<Float>& receptorAngle,
106 const Float& tol,
107 Vector<Int>& rowNumbers);
108
109 // return feed id.'s (and associated row numbers) for a given antenna id.
111
112 // return valid feed id.'s for a given list of feed id.'s.
114
115protected:
116 // the specialized compare function to pass to the
117 // <linkto class=ColumnsIndex>ColumnsIndex</linkto> object. This supports -1
118 // values for the SPECTRAL_WINDOW_ID
119 static Int compare (const Block<void*>& fieldPtrs,
120 const Block<void*>& dataPtrs,
121 const Block<Int>& dataTypes,
122 rownr_t index);
123
124private:
126
127 // Pointer to FEED columns accessor
129
130 void attachIds();
131};
132
133
134} //# NAMESPACE CASACORE - END
135
136#endif
137
simple 1-D array
Definition Block.h:200
MSFeedColumns * msFeedCols_p
Pointer to FEED columns accessor.
RecordFieldPtr< Int > antennaId_p
MSFeedIndex()
no index attached, use the attach function or assignment operator to change that
Vector< Int > matchAntennaId(const Int &antennaId, Vector< Int > &rowNumbers)
return feed id.
RecordFieldPtr< Int > spwId_p
Vector< Int > matchFeedId(const Vector< Int > &sourceId)
return valid feed id.
Int & antennaId()
access to the antenna ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:93
Int & spectralWindowId()
access to the spectral window ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:99
RecordFieldPtr< Int > feedId_p
void attach(const MSFeed &feed)
Vector< Int > matchFeedPolznAndAngle(const Int &antennaId, const Vector< String > &polznType, const Vector< Float > &receptorAngle, const Float &tol, Vector< Int > &rowNumbers)
return feed id.
MSFeedIndex(const MSFeedIndex &other)
construct one from another
static Int compare(const Block< void * > &fieldPtrs, const Block< void * > &dataPtrs, const Block< Int > &dataTypes, rownr_t index)
the specialized compare function to pass to the ColumnsIndex object.
MSFeedIndex & operator=(const MSFeedIndex &other)
Int & feedId()
access to the feed ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:96
MSFeedIndex(const MSFeed &feed)
construct one using the indicated FEED table
this file contains all the compiler specific defines
Definition mainpage.dox:28
float Float
Definition aipstype.h:54
int Int
Definition aipstype.h:50
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:46