casa
5.7.0-16
|
Virtual base class defining the Primary Beam interface. More...
#include <PBMathInterface.h>
Public Types | |
enum | PBClass { NONE, COMMONPB, AIRY, GAUSS, POLY, IPOLY, COSPOLY, NUMERIC, IMAGE, ZERNIKE } |
Allowed PBMath Classes. More... | |
enum | { NumberOfPBClasses } |
Number of different classes in PBClass enumeration. More... | |
Static Public Member Functions | |
static void | namePBClass (const PBMathInterface::PBClass iPB, casacore::String &str) |
Convert enumeration into a string. More... | |
Static Protected Member Functions | |
static casacore::Float | asFloat (const casacore::Complex &value) |
Functions to deal with conversions to Float. More... | |
static casacore::Float | asFloat (const casacore::DComplex &value) |
static casacore::Float | asFloat (const casacore::Float &value) |
static casacore::Float | asFloat (const casacore::Double &value) |
Protected Attributes | |
casacore::Bool | isThisVP_p |
Are the parameters being provided in the derived class constructor describing a Voltage Pattern or a Primary Beam? The default is Voltage Pattern, and we keep it internally as a voltage pattern. More... | |
BeamSquint | squint_p |
Beam squint: convention is AZ-EL offset of the casacore::Stokes RR beam w.r.t. More... | |
casacore::Bool | useSymmetricBeam_p |
Should we use the effective az-symmetrical primary beam? Otherwise, use squinted beam; if no squint, no difference. More... | |
casacore::String | bandOrFeedName_p |
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; More... | |
Virtual base class defining the Primary Beam interface.
Public interface
PBMathInterface defines the interface to PB Math objects, the encapsulations of the PB mathematical functioning
PBMathInterface is a virtual base class that defines the PBMath interface. The big thing that it does is to define the applyPB, applyVP, and applyPB2 methods, which call a polymorphic low level apply method depending upon whether the PBMath type is a 1D or 2D type.
PBMathInterface - there are many forms the primary beam can take, each of which will be derived from this virtual class which defines the generic interface to the multitude of PBMath objects. The main part of that interface is application of the PB to images, which is defined by PBMathInterface.
PBMathInterface is the virtual base class, and PBMath is an envelope type which is derived from PBMathInterface. The two letter classes currently envisioned are PBMath1D and PBMath2D.
PBMath can function independent of MeasurementSets. PBMath is used by the BeamSkyJones classes VPSkyJones and DBeamSkyJones.
The SkyJones classes are all tied up with the casacore::MS or VisBuffers. This class encapsulates the raw mathematical functionality of the PB from the BeamSkyJones-derived classes which deal with the casacore::MS/VisBuff's. Also, several different BeamSkyJones objects and effects can be treated with the same PBMath heirarchy objects.
Definition at line 114 of file PBMathInterface.h.
anonymous enum |
Number of different classes in PBClass enumeration.
Enumerator | |
---|---|
NumberOfPBClasses |
Definition at line 134 of file PBMathInterface.h.
Allowed PBMath Classes.
Currently, COMMONPB, Airy, Gauss, Poly, Ipoly, CosPoly, Numerical are all implemented; Image and Zernike (2D PB's) are not. This enumeration order becomes locked in when we get permanent PB's in the casacore::MeasurementSet Tables.
COMMPNPB is not really a PB Class, but is here for consistency with glish code in vpmanager
Enumerator | |
---|---|
NONE | |
COMMONPB | |
AIRY | |
GAUSS | |
POLY | |
IPOLY | |
COSPOLY | |
NUMERIC | |
IMAGE | |
ZERNIKE |
Definition at line 130 of file PBMathInterface.h.
casa::PBMathInterface::PBMathInterface | ( | casacore::Bool | isThisVP, |
BeamSquint | squint, | ||
casacore::Bool | useSymmetricBeam | ||
) |
Useful constructor.
|
pure virtual |
virtual destructor
|
protected |
Dumb constructor: protected, as it won't do you any good!
|
protectedpure virtual |
lower level helping apply methods
Implemented in casa::PBMath1D, and casa::PBMath2DImage.
|
protectedpure virtual |
Implemented in casa::PBMath1D, and casa::PBMath2DImage.
|
protectedpure virtual |
Implemented in casa::PBMath1D, and casa::PBMath2DImage.
casacore::ImageInterface<casacore::Complex>& casa::PBMathInterface::applyPB | ( | const casacore::ImageInterface< casacore::Complex > & | in, |
casacore::ImageInterface< casacore::Complex > & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Bool | inverse = false , |
||
casacore::Float | cutoff = 0.01 , |
||
casacore::Bool | forward = true |
||
) |
casacore::ImageInterface<casacore::Float>& casa::PBMathInterface::applyPB | ( | const casacore::ImageInterface< casacore::Float > & | in, |
casacore::ImageInterface< casacore::Float > & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Float | cutoff = 0.01 |
||
) |
SkyComponent& casa::PBMathInterface::applyPB | ( | SkyComponent & | in, |
SkyComponent & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | frequency, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Bool | inverse = false , |
||
casacore::Float | cutoff = 0.01 , |
||
casacore::Bool | forward = true |
||
) |
casacore::ImageInterface<casacore::Float>& casa::PBMathInterface::applyPB2 | ( | const casacore::ImageInterface< casacore::Float > & | in, |
casacore::ImageInterface< casacore::Float > & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Float | cutoff = 0.01 |
||
) |
This has a very specialized role (in SkyEquation) and should not be used elsewhere.
SkyComponent& casa::PBMathInterface::applyPB2 | ( | SkyComponent & | in, |
SkyComponent & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | frequency, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE |
||
) |
casacore::ImageInterface<casacore::Complex>& casa::PBMathInterface::applyVP | ( | const casacore::ImageInterface< casacore::Complex > & | in, |
casacore::ImageInterface< casacore::Complex > & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Bool | inverse = false , |
||
casacore::Bool | conjugate = false , |
||
casacore::Float | cutoff = 0.01 , |
||
casacore::Bool | forward = true |
||
) |
Apply Jones matrix to an image (and adjoint)
SkyComponent& casa::PBMathInterface::applyVP | ( | SkyComponent & | in, |
SkyComponent & | out, | ||
const casacore::MDirection & | sp, | ||
const casacore::Quantity | frequency, | ||
const casacore::Quantity | parAngle = casacore::Quantity(0.0,"deg") , |
||
const BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
casacore::Bool | inverse = false , |
||
casacore::Bool | conjugate = false , |
||
casacore::Float | cutoff = 0.01 , |
||
casacore::Bool | forward = true |
||
) |
Apply Jones matrix to a sky component (and adjoint)
|
inlinestaticprotected |
Functions to deal with conversions to Float.
Definition at line 307 of file PBMathInterface.h.
|
inlinestaticprotected |
Definition at line 308 of file PBMathInterface.h.
|
inlinestaticprotected |
Definition at line 309 of file PBMathInterface.h.
References casacore::value().
|
inlinestaticprotected |
Definition at line 310 of file PBMathInterface.h.
References casacore::value().
|
pure virtual |
Get the casacore::ImageRegion of the primary beam on an Image for a given pointing Note: casacore::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: fractional padding for extra support beyond PB. (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 casacore::ImageRegion includes all casacore::Stokes and Frequency Channels present in the input image.
Implemented in casa::PBMath1D, and casa::PBMath2D.
|
pure virtual |
Implemented in casa::PBMath1D, and casa::PBMath2D.
|
inlinevirtual |
Get value of useSymmetric.
Definition at line 228 of file PBMathInterface.h.
References useSymmetricBeam_p.
void casa::PBMathInterface::namePBClass | ( | casacore::String & | name | ) |
Convert PBClass enumeration into PBClass String.
|
static |
Convert enumeration into a string.
|
pure virtual |
Is state of PBMath object OK?
Implemented in casa::PBMath1D, and casa::PBMath2D.
|
inlinevirtual |
Definition at line 257 of file PBMathInterface.h.
References bandOrFeedName_p.
|
inlinevirtual |
Fit an azimuthally symmetric beam to the squinted or otherwise 2-D beam for casacore::Stokes I?
Definition at line 225 of file PBMathInterface.h.
References useSymmetricBeam_p.
|
virtual |
Summarize the Voltage Pattern; For PBMath1D, list nValues worth of the PB array.
Reimplemented in casa::PBMath1D, casa::PBMath2D, casa::PBMath1DIPoly, casa::PBMath1DNumeric, casa::PBMath1DGauss, casa::PBMath1DCosPoly, casa::PBMath1DPoly, casa::PBMath1DAiry, and casa::PBMath2DImage.
|
pure virtual |
Implemented in casa::PBMath1D, casa::PBMath2D, casa::PBMath2DImage, and casa::PBMath1DNumeric.
|
pure virtual |
Which PBClass is this one?
Implemented in casa::PBMath1DIPoly, casa::PBMath1DNumeric, casa::PBMath1DGauss, casa::PBMath1DCosPoly, casa::PBMath1DPoly, casa::PBMath1DAiry, casa::PBMath2DImage, and casa::PBMath1DEVLA.
|
friend |
required so PBMath can see the protected "apply" method Other derivatives of PBMathInterface, such as PBMath2D, will also require friend class PBMath;
Definition at line 120 of file PBMathInterface.h.
|
protected |
Definition at line 331 of file PBMathInterface.h.
Referenced by setBandOrFeedName().
|
protected |
Are the parameters being provided in the derived class constructor describing a Voltage Pattern or a Primary Beam? The default is Voltage Pattern, and we keep it internally as a voltage pattern.
Definition at line 319 of file PBMathInterface.h.
|
protected |
Beam squint: convention is AZ-EL offset of the casacore::Stokes RR beam w.r.t.
pointing position casacore::Stokes LL will be at -squint_p Southern observatories have the same AZ-EL and PA definitions as Northern
Definition at line 325 of file PBMathInterface.h.
|
protected |
Should we use the effective az-symmetrical primary beam? Otherwise, use squinted beam; if no squint, no difference.
Definition at line 329 of file PBMathInterface.h.
Referenced by getUseSymmetric(), and setUseSymmetric().