casa
$Rev:20696$
|
00001 //# PBMath1DGauss.h: Definitions of 1-D Gauss PBMath objects 00002 //# Copyright (C) 1996,1997,1998,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 adressed 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 SYNTHESIS_PBMATH1DGAUSS_H 00030 #define SYNTHESIS_PBMATH1DGAUSS_H 00031 00032 #include <casa/aips.h> 00033 #include <synthesis/TransformMachines/PBMath1D.h> 00034 #include <measures/Measures.h> 00035 00036 namespace casa { //# NAMESPACE CASA - BEGIN 00037 00038 //#forward 00039 00040 // <summary> 00041 // PBMath1DGauss is a 1-D Gaussian Primary Beam 00042 // </summary> 00043 00044 // <use visibility=export> 00045 00046 // <reviewed reviewer="" date="" tests="" demos=""> 00047 00048 // <prerequisite> 00049 // <li> <linkto class="PBMathInterface">PBMathInterface</linkto> class 00050 // <li> <linkto class="PBMath1D">PBMath1D</linkto> class 00051 // </prerequisite> 00052 // 00053 // <etymology> 00054 // PBMath1DGauss: derived from PBMath1D, implements a gaussian PB and VP 00055 // </etymology> 00056 // 00057 // <synopsis> 00058 // See PBMath1D for a general synopsis of the 1D PB types. 00059 // Remember that we construct based on Voltage Patterns rather than 00060 // primary beams. The Voltage Pattern HWHM width will be sqrt(2) 00061 // times larger than the Primary Beam HWHM. 00062 // 00063 // VP(x) = exp( - ( x/HWHM )**2 * log(2) ), out to maximumRadius 00064 // </synopsis> 00065 // 00066 // 00067 // <example> 00068 // <srcblock> 00069 // 00070 // PBMath1DGauss myPB (Quantity(1.0, "'"), 00071 // Quantity(3.0, "'"), 00072 // Quantity(1.0, "GHz"), 00073 // BeamSquint(MDirection(Quantity(2.0, "\""), 00074 // Quantity(0.0, "\""), 00075 // MDirection::Ref(MDirection::AZEL)), 00076 // Quantity(2.0, "GHz")), 00077 // False); 00078 // </srcblock> 00079 // </example> 00080 // 00081 // <motivation> 00082 // All of the 1-D PB types have everything in common except for the 00083 // details of their parameterization. This lightweight class 00084 // deals with those differences: construction, filling the PBArray 00085 // from construction parameters, and flushing to disk. 00086 // BIMA uses a Gaussian PB. 00087 // </motivation> 00088 // 00089 // <todo asof="98/10/21"> 00090 // <li> constructor from a MS beam subtable 00091 // <li> flush to MS beam subtable 00092 // </todo> 00093 00094 00095 class PBMath1DGauss : public PBMath1D { 00096 public: 00097 00098 PBMath1DGauss(); 00099 00100 // Instantiation from arguments; default = no squint 00101 // squint is the offset from pointing center if the Stokes R beam 00102 // useSymmetricBeam forces a fit to the squinted beam 00103 // width = Half-Width-Half-max 00104 // maxRad = half-width at zero intensity 00105 PBMath1DGauss( Quantity halfWidth, Quantity maxRad, Quantity refFreq, 00106 Bool isThisVP=False, 00107 BeamSquint squint=BeamSquint(MDirection(Quantity(0.0, "deg"), 00108 Quantity(0.0, "deg"), 00109 MDirection::Ref(MDirection::AZEL)), 00110 Quantity(1.0, "GHz")), 00111 Bool useSymmetricBeam=False); 00112 00113 // Instantiation from a row in the Beam subTable 00114 // PBMath1DGauss(const Table& BeamSubTable, Int row, 00115 // Bool useSymmetricBeam=False); 00116 00117 // Copy constructor 00118 // PBMath1DGauss(const PBMath1DGauss& other); 00119 00120 // Assignment operator, by reference 00121 PBMath1DGauss& operator=(const PBMath1DGauss& other); 00122 00123 // Clone the object 00124 // CountedPtr<PBMathInterface> clone(); 00125 00126 // destructor 00127 ~PBMath1DGauss(); 00128 00129 // Get the type of PB this is 00130 PBMathInterface::PBClass whichPBClass() { return PBMathInterface::GAUSS; } 00131 00132 // Flush the construction parameters to disk 00133 // Bool flushToTable(Table& beamSubTable, Int iRow); 00134 00135 // Summarize the construction data for this primary beam 00136 void summary(Int nValues=0); 00137 00138 protected: 00139 00140 // Fill in vp_p array from construction parameters 00141 void fillPBArray(); 00142 00143 private: 00144 00145 Quantity halfWidth_p; 00146 00147 }; 00148 00149 00150 } //# NAMESPACE CASA - END 00151 00152 #endif