Line data Source code
1 : //# PBMath1DAiry.h: Definitions of 1-D Airy PBMath objects 2 : //# Copyright (C) 1996,1997,1998,2003 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 adressed as follows: 20 : //# Internet email: casa-feedback@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 SYNTHESIS_PBMATH1DAIRY_H 30 : #define SYNTHESIS_PBMATH1DAIRY_H 31 : 32 : #include <casacore/casa/aips.h> 33 : #include <synthesis/TransformMachines/PBMath1D.h> 34 : #include <casacore/measures/Measures.h> 35 : 36 : namespace casa { //# NAMESPACE CASA - BEGIN 37 : 38 : //#forward 39 : 40 : // <summary> 41 : // PBMath1DAiry is a 1-D Airy Disk voltage pattern & Primary Beam 42 : // </summary> 43 : 44 : // <use visibility=export> 45 : 46 : // <reviewed reviewer="" date="" tests="" demos=""> 47 : 48 : // <prerequisite> 49 : // <li> <linkto class="PBMathInterface">PBMathInterface</linkto> class 50 : // <li> <linkto class="PBMath1D">PBMath1D</linkto> class 51 : // </prerequisite> 52 : // 53 : // <etymology> 54 : // PBMath1DAiry: derived from PBMath1D, implements an Airy pattern PB and VP 55 : // </etymology> 56 : // 57 : // <synopsis> 58 : // See PBMath1D for a general synopsis of the 1D PB types. 59 : // 60 : // For an unblocked dish: 61 : // VP(x) = 2 * j1(x)/x 62 : // 63 : // For blockage: 64 : // areaRatio = (dish/block)^2; 65 : // lengthRat = (dish/block); 66 : // VP(x) = ( areaRatio* 2 * j1(x)/x - 2 j1(x*lengthRat)/(x*lengthRat) ) / (areaRatio - 1); 67 : // </synopsis> 68 : // 69 : // 70 : // <example> 71 : // <srcblock> 72 : // PBMath1DAiry airyPB( casacore::Quantity(24.5,"m"), casacore::Quantity(2.5,"m"), 73 : // casacore::Quantity(2*0.8564,"deg"), casacore::Quantity(1.0,"GHz") ); 74 : // airyPB.applyPB( inImage, outImage, pointingDir); 75 : // </srcblock> 76 : // </example> 77 : // 78 : // <motivation> 79 : // All of the 1-D PB types have everything in common except for the 80 : // details of their parameterization. This lightweight class 81 : // deals with those differences: construction, filling the PBArray 82 : // from construction parameters, and flushing to disk. 83 : // </motivation> 84 : // 85 : // <todo asof="98/10/21"> 86 : // <li> constructor from a casacore::MS beam subtable 87 : // <li> flush to casacore::MS beam subtable 88 : // </todo> 89 : 90 : 91 : class PBMath1DAiry : public PBMath1D { 92 : public: 93 : 94 : PBMath1DAiry(); 95 : 96 : // Instantiation from arguments; 97 : // referenceFreq is used to scale maximumradius. 98 : // default = no squint 99 : // squint is the offset from pointing center if the casacore::Stokes R beam 100 : // useSymmetricBeam forces a fit to the squinted beam 101 : PBMath1DAiry(casacore::Quantity dishDiam, casacore::Quantity blockedDiam, 102 : casacore::Quantity maxRad, casacore::Quantity refFreq, 103 395 : BeamSquint squint=BeamSquint(casacore::MDirection(casacore::Quantity(0.0, "deg"), 104 395 : casacore::Quantity(0.0, "deg"), 105 : casacore::MDirection::Ref(casacore::MDirection::AZEL)), 106 395 : casacore::Quantity(1.0, "GHz")), 107 : casacore::Bool useSymmetricBeam=false); 108 : 109 : // Instantiation from a row in the Beam subTable 110 : //PBMath1DAiry(const casacore::Table& BeamSubTable, casacore::Int row, 111 : // casacore::Bool useSymmetricBeam=false); 112 : 113 : // Copy constructor 114 : // PBMath1DAiry(const PBMath1DAiry& other); 115 : 116 : // Assignment operator, by reference 117 : PBMath1DAiry& operator=(const PBMath1DAiry& other); 118 : 119 : // Clone the object 120 : // casacore::CountedPtr<PBMathInterface> clone(); 121 : 122 : //destructor 123 : ~PBMath1DAiry(); 124 : 125 : // Get the type of PB this is 126 277 : PBMathInterface::PBClass whichPBClass() { return PBMathInterface::AIRY; } 127 : 128 : // Flush the construction parameters to disk 129 : // casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow); 130 : 131 : // Summarize the construction data for this primary beam 132 : void summary(casacore::Int nValues=0); 133 : 134 : protected: 135 : 136 : // Fill in vp_p array from construction parameters 137 : void fillPBArray(); 138 : 139 : private: 140 : 141 : casacore::Quantity dishDiam_p; 142 : casacore::Quantity blockedDiam_p; 143 : 144 : }; 145 : 146 : 147 : } //# NAMESPACE CASA - END 148 : 149 : #endif