- UNKNOWN
- DEFAULT
- ATCA_L1
- ATCA_L2
- ATCA_L3
- ATCA_S
- ATCA_C
- ATCA_X
- GBT
- GMRT
- HATCREEK
- NRAO12M
- NRAO140FT
- OVRO
- VLA
- VLA_INVERSE
- VLA_NVSS
- VLA_2NULL
- VLA_4
- VLA_P
- VLA_L
- VLA_C
- VLA_X
- VLA_U
- VLA_K
- VLA_Q
- WSRT
- WSRT_LOW
- ALMA
- ALMASD
- ACA
- NONE
- IRAMPDB
- IRAM30M
- NumberOfCommonPB = 34
Construct a PBMath via PBMath's enumerated CommonPB type.
PBMath wsrtPB(PBMath::WSRT); PBMath vla_LPB(PBMath::VLA_L); // has L band squint built in
A PBMath can also be constructed by the complete argument list for the type of PB it holds. Since different PB types can have the same argument list (PBMath1DPoly and PBMath1DIPoly, for example), the exact type also needs to be specified via the PBMathInterface::PBClass.
The main thing you want to do with a primary beam or voltage pattern is to apply it to an image. The PBMath object forwards its low level "apply" calls to the letter class's "apply" calls.
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 </synopsis> <motivation> This Envelope class allows the user to create a PBMath object which can display all the polymorphic traits of PBMath1D classes or PBMath2D classes. </motivation> <todo asof="98/010/21"> </todo>Member Description
enum CommonPB
This enumeration provides a simple way to instantiate the common primary beam models. They are each represented by one of the more fundamental PBMath1D typesNew CommonPB Types must go to the end
enum
PBMath()
Default constructor, required for Blockexplicit PBMath(PBMath::CommonPB myPBType, Bool useSymmetricBeam=False)
Make a PB of common type
PBMath(String& telescopeName, Bool useSymmetricBeam=False, Quantity freq=Quantity(0.0, "Hz"))
Make a PB from a telescopename and frequency
explicit PBMath(const RecordInterface& myrec)
Make a PB from a RecordInterface
PBMath(PBMathInterface::PBClass theclass, Quantity halfWidth, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(MDirection(Quantity(0.0, "deg"), Quantity(0.0, "deg"), MDirection::Ref(MDirection::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
Make a Gaussian Primary beam
PBMath(PBMathInterface::PBClass theclass, const Vector<Double>& coeff, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(maxRad(Quantity(0.0, "deg"), Quantity(0.0, "deg"), maxRad::Ref(maxRad::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
Make a Polynomial, Inverse Polynomial, or Numeric Primary beam (These three have identical calling signatures, they can only be distinguished by the PBClass enumeration)
PBMath(PBMathInterface::PBClass theclass, const Vector<Float>& coeff, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(maxRad(Quantity(0.0, "deg"), Quantity(0.0, "deg"), maxRad::Ref(maxRad::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
Make a Numeric Primary beam (FLOAT!)
PBMath(PBMathInterface::PBClass theclass, const Vector<Double>& coeff, const Vector<Double>& scale, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(MDirection(Quantity(0.0, "deg"), Quantity(0.0, "deg"), MDirection::Ref(MDirection::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
Make a CosPolynomial beam type
PBMath(PBMathInterface::PBClass theclass, Quantity dishDiam, Quantity blockageDiam, Quantity maxRad, Quantity refFreq, BeamSquint squint=BeamSquint(blockageDiam(Quantity(0.0, "deg"), Quantity(0.0, "deg"), blockageDiam::Ref(blockageDiam::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
Make an Airy beam type
PBMath(PBMathInterface::PBClass theclass, ImageInterface<Float>& reJones)
Make an Image-based beam
PBMath(PBMathInterface::PBClass theclass, ImageInterface<Float>& reJones, ImageInterface<Float>& imJones)
PBMath(const PBMath &other)
Instantiate from a Table PBMath(const Table& theTable, Int row);
copy ctor: copies the reference counted pointer
~PBMath()
destructor
PBMath& operator=(const PBMath& other)
operator= returns a reference to the PBMath; reference counted pointer
Bool operator==(const PBMath& other) const
comparison operator: just checks that the objects are same (could have two different objects with identical data, these are treated as !=)
Bool operator!=(const PBMath& other) const
comparison operator: just checks that the objects are different (could have two different objects with identical data, these are treated as !=)
ImageInterface<Complex>& applyVP(const ImageInterface<Complex>& in, ImageInterface<Complex>& out, const in& sp, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE, Bool inverse = False, Bool conjugate = False, Float cutoff = 0.01, Bool forward=True)
ImageInterface<Complex>& applyPB(const ImageInterface<Complex>& in, ImageInterface<Complex>& out, const in& sp, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE, Bool inverse = False, Float cutoff = 0.01, Bool forward = True)
ImageInterface<Float>& applyPB2(const ImageInterface<Float>& in, ImageInterface<Float>& out, const MDirection& sp, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE, Float cutoff=0.01)copy() returns a copy of the PBMath PBMath copy() const;
Apply Jones matrix to an image (and adjoint)
SkyComponent& applyVP(SkyComponent& in, SkyComponent& out, const out& sp, const Quantity frequency, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE, Bool inverse = False, Bool conjugate = False, Float cutoff = 0.01, Bool forward = True)
SkyComponent& applyPB(SkyComponent& in, SkyComponent& out, const out& sp, const Quantity frequency, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE, Bool inverse = False, Float cutoff = 0.01, Bool forward = True)
SkyComponent& applyPB2(SkyComponent& in, SkyComponent& out, const out& sp, const Quantity frequency, const Quantity parAngle = Quantity(0.0,"deg"), const BeamSquint::SquintType doSquint = BeamSquint::NONE)Apply Jones matrix to a sky component (and adjoint)
void setUseSymmetric(Bool useSym=True)
Fit an azimuthally symmetric beam to the squinted or otherwise 2-D beam for Stokes I?
Bool getUseSymmetric()
Get value of useSymmetric
PBMathInterface::PBClass whichPBClass()
Get the type of PB this is
void summary(Int nValues=0)
Summarize the Voltage Pattern;
Bool ok() const
Is the state of the PBMath OK?
ImageRegion* extent (const ImageInterface<Complex>& im, const Complex& pointing, const Int row, const Float fPad, const Int iChan, const MDirection::SizeType)
Get the BLC, TRC of the primary beam on an Image for a given pointing Note: BLC and TRC are 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 above PB 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
ImageRegion* extent (const ImageInterface<Float>& im, const MDirection& pointing, const Int row, const Float fPad, const Int iChan, const MDirection::SizeType)
static void whichCommonPBtoUse (String &telescope, Quantity &freq, String &band, PBMath::CommonPB &whichPB, String &pbName)
given the Telescope name and the frequency, guess the most approrpiate CommonPB primary beam type and the band
static void nameCommonPB(const PBMath::CommonPB iPB, String & str)
converts the enumrated type into a string
static void enumerateCommonPB(const String & str, PBMath::CommonPB &ipb)
converts the PB String into an enumrated type
void namePBClass(String & name)
gives the name of the PB Class that has been used
void initByTelescope(PBMath::CommonPB myPBType, Bool useSymmetricBeam=False, Double frequency=0.0)
These should probably move to RecordInterface when we are happy with their performance
Function to initialize the state of the tool
Bool getQuantity(const RecordInterface& rec, const String& item, Quantity& returnedQuantity) const
Bool getMDirection(const RecordInterface& rec, const String& item, String& returnedMDirection) const
These should probably move to RecordInterface when we are happy with their performance