Loading...
Searching...
No Matches
MSFeedIndex.h
Go to the documentation of this file.
//# MSFeedIndex: index into a MeasurementSet FEED subtable
//# Copyright (C) 2000,2001,2002
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef MS_MSFEEDINDEX_H
#define MS_MSFEEDINDEX_H
#include <casacore/casa/aips.h>
#include <casacore/ms/MSSel/MSTableIndex.h>
#include <casacore/ms/MeasurementSets/MSFeedColumns.h>
#include <casacore/casa/Containers/RecordField.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
//# forward declarations
class MSFeed;
// <summary>
// </summary>
// <use visibility=export>
// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
// </reviewed>
// <prerequisite>
// <li> MeasurementSet
// <li> MSTableIndex
// </prerequisite>
//
// <etymology>
// </etymology>
//
// <synopsis>
// </synopsis>
//
// <example>
// </example>
//
// <motivation>
// </motivation>
//
// <thrown>
// <li>
// <li>
// </thrown>
//
class MSFeedIndex : public MSTableIndex
{
public:
// no index attached, use the attach function or assignment operator to change that
MSFeedIndex();
// construct one using the indicated FEED table
MSFeedIndex(const MSFeed &feed);
// construct one from another
MSFeedIndex(const MSFeedIndex &other);
virtual ~MSFeedIndex();
MSFeedIndex &operator=(const MSFeedIndex &other);
void attach(const MSFeed &feed);
// access to the antenna ID key, throws an exception if isNull() is False
Int &antennaId() {return *antennaId_p;}
// access to the feed ID key, throws an exception if isNull() is False
Int &feedId() {return *feedId_p;}
// access to the spectral window ID key, throws an exception if isNull() is False
Int &spectralWindowId() {return *spwId_p;}
// return feed id.'s (and associated row numbers) for a given antenna id.,
// polzn type and receptor angle
Vector<Int> matchFeedPolznAndAngle(const Int& antennaId,
const Vector<String>& polznType,
const Vector<Float>& receptorAngle,
const Float& tol,
Vector<Int>& rowNumbers);
// return feed id.'s (and associated row numbers) for a given antenna id.
Vector<Int> matchAntennaId(const Int& antennaId, Vector<Int>& rowNumbers);
// return valid feed id.'s for a given list of feed id.'s.
Vector<Int> matchFeedId(const Vector<Int>& sourceId);
protected:
// the specialized compare function to pass to the
// <linkto class=ColumnsIndex>ColumnsIndex</linkto> object. This supports -1
// values for the SPECTRAL_WINDOW_ID
static Int compare (const Block<void*>& fieldPtrs,
const Block<void*>& dataPtrs,
const Block<Int>& dataTypes,
rownr_t index);
private:
RecordFieldPtr<Int> antennaId_p, feedId_p, spwId_p;
// Pointer to FEED columns accessor
MSFeedColumns* msFeedCols_p;
void attachIds();
};
} //# NAMESPACE CASACORE - END
#endif
casacore::Block
simple 1-D array
Definition Block.h:198
casacore::MSFeedColumns
Definition MSFeedColumns.h:83
casacore::MSFeedIndex::msFeedCols_p
MSFeedColumns * msFeedCols_p
Pointer to FEED columns accessor.
Definition MSFeedIndex.h:125
casacore::MSFeedIndex::antennaId_p
RecordFieldPtr< Int > antennaId_p
Definition MSFeedIndex.h:122
casacore::MSFeedIndex::MSFeedIndex
MSFeedIndex()
no index attached, use the attach function or assignment operator to change that
casacore::MSFeedIndex::matchAntennaId
Vector< Int > matchAntennaId(const Int &antennaId, Vector< Int > &rowNumbers)
return feed id.
casacore::MSFeedIndex::spwId_p
RecordFieldPtr< Int > spwId_p
Definition MSFeedIndex.h:122
casacore::MSFeedIndex::matchFeedId
Vector< Int > matchFeedId(const Vector< Int > &sourceId)
return valid feed id.
casacore::MSFeedIndex::~MSFeedIndex
virtual ~MSFeedIndex()
casacore::MSFeedIndex::antennaId
Int & antennaId()
access to the antenna ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:90
casacore::MSFeedIndex::spectralWindowId
Int & spectralWindowId()
access to the spectral window ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:96
casacore::MSFeedIndex::feedId_p
RecordFieldPtr< Int > feedId_p
Definition MSFeedIndex.h:122
casacore::MSFeedIndex::attach
void attach(const MSFeed &feed)
casacore::MSFeedIndex::matchFeedPolznAndAngle
Vector< Int > matchFeedPolznAndAngle(const Int &antennaId, const Vector< String > &polznType, const Vector< Float > &receptorAngle, const Float &tol, Vector< Int > &rowNumbers)
return feed id.
casacore::MSFeedIndex::MSFeedIndex
MSFeedIndex(const MSFeedIndex &other)
construct one from another
casacore::MSFeedIndex::compare
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.
casacore::MSFeedIndex::attachIds
void attachIds()
casacore::MSFeedIndex::operator=
MSFeedIndex & operator=(const MSFeedIndex &other)
casacore::MSFeedIndex::feedId
Int & feedId()
access to the feed ID key, throws an exception if isNull() is False
Definition MSFeedIndex.h:93
casacore::MSFeedIndex::MSFeedIndex
MSFeedIndex(const MSFeed &feed)
construct one using the indicated FEED table
casacore::MSFeed
Definition MSFeed.h:77
casacore::MSTableIndex::MSTableIndex
MSTableIndex()
no index attached, use the attach function or assignment operator to change that
casacore::RecordFieldPtr
Definition ColumnsIndex.h:42
casacore::Vector
Definition Vector.h:82
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::Float
float Float
Definition aipstype.h:52
casacore::Int
int Int
Definition aipstype.h:48
casacore::rownr_t
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44