casa
$Rev:20696$
|
base class for 1D PBMath objects More...
#include <PBMath2D.h>
Public Member Functions | |
PBMath2D () | |
virtual | ~PBMath2D () |
virtual void | summary (Int nValues=0) |
Summarize the Voltage Pattern; For PBMath2D, list nValues worth of the VP array. | |
virtual Bool | ok () |
Is state of PBMath OK? | |
ImageRegion * | extent (const ImageInterface< Complex > &in, const MDirection &pointing, const Int irow, const Float fPad, const Int iChan, const SkyJones::SizeType sizeType) |
Get the ImageRegion of the primary beam on an Image for a given pointing Note: ImageRegion is not necesarily constrained to lie within the image region (for example, if the pointing center is near the edge of the image). | |
ImageRegion * | extent (const ImageInterface< Float > &in, const MDirection &pointing, const Int irow, const Float fPad, const Int iChan, const SkyJones::SizeType sizeType) |
virtual Int | support (const CoordinateSystem &cs) |
Friends | |
class | PBMath |
required so PBMath can see the protected "apply" method Other derivatives of PBMathInterface, such as PBMath2D, will also require friend class PBMath; |
base class for 1D PBMath objects
Public interface
PBMath types do the mathematical operations of the PB's or VP's. This is the base class for the 1D (ie, rotationally symmetric) PB's.
PBMath2D, the virtual base class for 1D PBMath objects, is derived from PBMathInterface. Its cousin, PBMath2D, can deal with inherently 2D voltage patterns or primary beams. PBMath2D can deal with beam squint, (ie, the offset of the LL and RR beams on opposite sides of the pointing center) which rotates on the sky with parallactic angle.
The 1D PB philosophy is to specify the Voltage pattern or Primary Beam via a small number of parameters via one of the derived types (PBMath2DGauss, for example). The derived type knows how to instantiate itself from a row in a beam subTable, and how to convert itself into a lookup vector. The lookup vector is fine enough that no interpolation need be done when finding the nearest PB or VP value for a particular pixel (currently, there are 1e+4 elements in the lookup vector, so on average, an error on order of 1e-4 is made when applying the primary beam).
There are two ways of creating the derived PB types: 1) explicitly create one of the babies. You have control over the details such as PB size and total extent, the reference frequency at which this size is true (the size scales inversely with wavelength), the squint orientation, and whether a mean symmetrized beam will be calculated from the squinted beam. (Nice defaults can reduce the arguments in most cases.)
PBMath2DGauss myPB (Quantity(1.0, "'"), Quantity(3.0, "'"), Quantity(1.0, "GHz"), False, // these are PB parameters, not VP BeamSquint(MDirection(Quantity(2.0, "\""), Quantity(0.0, "\""), MDirection::Ref(MDirection::AZEL)), Quantity(2.0, "GHz")), False); PBMath2DGauss myPB2 (Quantity(1.0, "'"), Quantity(3.0, "'"), Quantity(1.0, "GHz"));
2) via the envelope class PBMath's enumerated CommonPB type. This is much simpler, and will deal with a majority of the cases required:
PBMath wsrtPB(PBMath::WSRT); PBMath vla_LPB(PBMath::VLA_L); // has L band squint built in
The main thing you want to do with a primary beam or voltage pattern is to apply it to an image. The top level "apply" methods are defined in PBMathInterface. They are applyPB, applyPB2, applyVP. These top level apply's then call a lower level private polymorphic apply, which are defined in PBMath2D and in PBMath2D. These two different apply's deal with the different details of 1D and 2D primary beam application.
PagedImage<Float> in; PagedImage<Complex> out; MDirection pointingDir(Quantity(135.0, "deg"), Quantity(60.0, "deg"), MDirection::Ref(MDirection::J2000)); Quantity parallacticAngle(26.5, "deg"); PBMath wsrtPB(PBMath::WSRT_LOW); wsrtPB.applyPB(in, out, pointingDir); // multiply by primary beam wsrtPB.applyPB(in, out, pointingDir, parallacticAngle, BeamSquint::GOFIGURE, True, 0.02); // divide by primary beam wsrtPB.applyVP(in, out, pointingDir); // multiply by voltage pattern
All of the 2-D PB types have everything in common except for the details of their parameterization.
lower level helping apply methods: reduce code by this bundling
Definition at line 150 of file PBMath2D.h.
virtual casa::PBMath2D::~PBMath2D | ( | ) | [virtual] |
ImageRegion* casa::PBMath2D::extent | ( | const ImageInterface< Complex > & | in, |
const MDirection & | pointing, | ||
const Int | irow, | ||
const Float | fPad, | ||
const Int | iChan, | ||
const SkyJones::SizeType | sizeType | ||
) | [virtual] |
Get the ImageRegion of the primary beam on an Image for a given pointing Note: ImageRegion is not necesarily constrained to lie within the image region (for example, if the pointing center is near the edge of the image).
fPad: extra fractional padding, beyond Primary Beam support (note: we do not properly treat squint yet, this will cover it for now) iChan: frequency channel to take: lowest frequency channel is safe for all
Potential problem: this ImageRegion includes all Stokes and Frequency Channels present in the input image.
Implements casa::PBMathInterface.
ImageRegion* casa::PBMath2D::extent | ( | const ImageInterface< Float > & | in, |
const MDirection & | pointing, | ||
const Int | irow, | ||
const Float | fPad, | ||
const Int | iChan, | ||
const SkyJones::SizeType | sizeType | ||
) | [virtual] |
Implements casa::PBMathInterface.
virtual Bool casa::PBMath2D::ok | ( | ) | [virtual] |
Is state of PBMath OK?
Implements casa::PBMathInterface.
virtual void casa::PBMath2D::summary | ( | Int | nValues = 0 | ) | [virtual] |
Summarize the Voltage Pattern; For PBMath2D, list nValues worth of the VP array.
Reimplemented from casa::PBMathInterface.
Reimplemented in casa::PBMath2DImage.
virtual Int casa::PBMath2D::support | ( | const CoordinateSystem & | cs | ) | [virtual] |
Implements casa::PBMathInterface.
Reimplemented in casa::PBMath2DImage.
friend class PBMath [friend] |
required so PBMath can see the protected "apply" method Other derivatives of PBMathInterface, such as PBMath2D, will also require friend class PBMath;
Reimplemented from casa::PBMathInterface.
Definition at line 156 of file PBMath2D.h.