casa
$Rev:20696$
|
00001 //# GBTFeedInfo.h: GBTFeedInfo is a simple class used by GBTMSFeedFiller 00002 //# Copyright (C) 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 //# 00027 //# $Id$ 00028 00029 #ifndef NRAO_GBTFEEDINFO_H 00030 #define NRAO_GBTFEEDINFO_H 00031 00032 #include <casa/aips.h> 00033 00034 #include <casa/Arrays/Vector.h> 00035 #include <casa/Containers/Block.h> 00036 #include <casa/BasicSL/String.h> 00037 #include <casa/namespace.h> 00038 00039 // <summary> 00040 // GBTFeedInfo is simple class used in GBTMSFeedFiller 00041 // </summary> 00042 00043 // <use visibility=local> 00044 00045 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00046 // </reviewed> 00047 00048 // <etymology> 00049 // The FEED filler needs to keep track of related information to 00050 // sort out what feeds need to be filled with unique FEED_IDs. 00051 // This class keeps that all together for each feed to be filled. 00052 // </etymology> 00053 // 00054 // <synopsis> 00055 // Used internally in GBTMSFeedFiller. 00056 // </synopsis> 00057 // 00058 // <motivation> 00059 // Book-keeping in the code using Block, Matricies, et al was getting 00060 // too cumbersom primarily because the number of receptors on a given 00061 // feed can vary. Putting it in here cleans up the code in the filler. 00062 // </motivation> 00063 // 00064 00065 class GBTFeedInfo 00066 { 00067 public: 00068 00069 // default constructor - initializes internals for unknown feed 00070 GBTFeedInfo(); 00071 00072 // copy constructor - copy semantics 00073 GBTFeedInfo(const GBTFeedInfo &other); 00074 00075 ~GBTFeedInfo() {;} 00076 00077 // assignment operator - copy semantics 00078 GBTFeedInfo &operator=(const GBTFeedInfo &other); 00079 00080 // get/set the feed number as used in the ifloHelper 00081 Int feedNumber() const {return itsFeedNumber;} 00082 void setFeedNumber(Int feedNumber) {itsFeedNumber = feedNumber;} 00083 00084 // get/set the physical feed number 00085 Int physFeed() const {return itsPhysFeed;} 00086 void setPhysFeed(Int physFeed) {itsPhysFeed = physFeed;} 00087 00088 // get the rows in the IF table that map to this feed 00089 const Block<Int> ifRows() const { return itsIFRows;} 00090 // add a row to the set of if rows that map to this feed 00091 void addRow(Int whichRow); 00092 00093 // set the polarization information for the indicated 00094 // receptor and also set the number of receptors if not 00095 // otherwise set. If nrec is not equal to the current 00096 // size of the polarization vector, it will be resized 00097 // and all of its contents will be lost. 00098 void setPol(const String &pol, Int whichRec, Int nrec); 00099 00100 // get the polarization vector 00101 const Vector<String> &polarize() const { return itsPolz;} 00102 00103 // set the xel and el offsets - converts from degrees to radians 00104 void setOffsets(Double xeloffset, Double eloffset); 00105 00106 // get the vector of offsets 00107 const Vector<Double> &offsets() const { return itsOffsets;} 00108 00109 // set the name this is known by 00110 void setName(const String &name) {itsName = name;} 00111 // get the name 00112 const String &name() const {return itsName;} 00113 00114 // set the feed number of the associated feed, if any. 00115 // Set this to itself if there is no associated feed. 00116 // This number should be the feedNumber() of the 00117 // associated feed. 00118 void setSRFeedNumber(Int feedNumber) {itsSRFeedNumber = feedNumber;} 00119 // get the associated feed number 00120 Int srFeedNumber() const { return itsSRFeedNumber;} 00121 00122 private: 00123 Int itsFeedNumber, itsPhysFeed; 00124 Block<Int> itsIFRows; 00125 Vector<String> itsPolz; 00126 Vector<Double> itsOffsets; 00127 String itsName; 00128 Int itsSRFeedNumber; 00129 }; 00130 00131 00132 #endif