casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::PBMath1DIPoly Class Reference

PBMath1DIPoly is a 1-D Inverse casacore::Polynomial Expansion for a Primary Beam. More...

#include <PBMath1DIPoly.h>

Inheritance diagram for casa::PBMath1DIPoly:
casa::PBMath1D casa::PBMathInterface

Public Member Functions

 PBMath1DIPoly ()
 
 PBMath1DIPoly (const casacore::Vector< casacore::Double > &coeff, casacore::Quantity maxRad, casacore::Quantity refFreq, casacore::Bool isThisVP=false, BeamSquint squint=BeamSquint(casacore::MDirection(casacore::Quantity(0.0,"deg"), casacore::Quantity(0.0,"deg"), casacore::MDirection::Ref(casacore::MDirection::AZEL)), casacore::Quantity(1.0,"GHz")), casacore::Bool useSymmetricBeam=false)
 Instantiation from arguments; default = no squint squint is the offset from pointing center if the casacore::Stokes R beam useSymmetricBeam forces a fit to the squinted beam. More...
 
 PBMath1DIPoly (const casacore::Matrix< casacore::Double > &coeff, const casacore::Vector< casacore::Double > &freqs, casacore::Quantity maxRad, casacore::Quantity refFreq, casacore::Bool isThisVP=false, BeamSquint squint=BeamSquint(casacore::MDirection(casacore::Quantity(0.0,"deg"), casacore::Quantity(0.0,"deg"), casacore::MDirection::Ref(casacore::MDirection::AZEL)), casacore::Quantity(1.0,"GHz")), casacore::Bool useSymmetricBeam=false)
 Instantiation from arguments; default = no squint squint is the offset from pointing center if the casacore::Stokes R beam useSymmetricBeam forces a fit to the squinted beam Each column in coeff corresponds to a frequency in freqs. More...
 
PBMath1DIPolyoperator= (const PBMath1DIPoly &other)
 Instantiation from a row in the Beam subTable PBMath1DIPoly(const casacore::Table& BeamSubTable, casacore::Int row, casacore::Bool useSymmetricBeam=false);. More...
 
 ~PBMath1DIPoly ()
 Clone the object casacore::CountedPtr<PBMathInterface> clone();. More...
 
PBMathInterface::PBClass whichPBClass ()
 Get the type of PB this is. More...
 
void summary (casacore::Int nValues=0)
 Flush the construction parameters to disk casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow);. More...
 
- Public Member Functions inherited from casa::PBMath1D
 PBMath1D (casacore::Quantity maximumRadius, casacore::Quantity refFreq, casacore::Bool isThisVP, BeamSquint squint, casacore::Bool useSymmetricBeam)
 
virtual ~PBMath1D ()=0
 
void viewPB (casacore::Vector< casacore::Float > &r, casacore::Vector< casacore::Float > &PB, casacore::Int n_elements, const casacore::Double freq=1.0e9)
 Get the PB in a vector to look at Concerning n_elements: they are evenly spaced between 0 and maxradius. More...
 
virtual casacore::Bool ok ()
 Is state of PBMath OK? More...
 
casacore::ImageRegionextent (const casacore::ImageInterface< casacore::Complex > &in, const casacore::MDirection &pointing, const casacore::Int irow, const casacore::Float fPad, const casacore::Int iChan, const SkyJones::SizeType sizeType)
 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). More...
 
casacore::ImageRegionextent (const casacore::ImageInterface< casacore::Float > &in, const casacore::MDirection &pointing, const casacore::Int irow, const casacore::Float fPad, const casacore::Int iChan, const SkyJones::SizeType sizeType)
 
virtual casacore::Int support (const casacore::CoordinateSystem &cs)
 
- Public Member Functions inherited from casa::PBMathInterface
 PBMathInterface (casacore::Bool isThisVP, BeamSquint squint, casacore::Bool useSymmetricBeam)
 Useful constructor. More...
 
virtual ~PBMathInterface ()=0
 virtual destructor More...
 
casacore::ImageInterface
< casacore::Complex > & 
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) More...
 
casacore::ImageInterface
< casacore::Complex > & 
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 > & 
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)
 
casacore::ImageInterface
< casacore::Float > & 
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. More...
 
SkyComponentapplyVP (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) More...
 
SkyComponentapplyPB (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)
 
SkyComponentapplyPB2 (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)
 
void namePBClass (casacore::String &name)
 Convert PBClass enumeration into PBClass String. More...
 
virtual void setUseSymmetric (casacore::Bool useSym=true)
 Fit an azimuthally symmetric beam to the squinted or otherwise 2-D beam for casacore::Stokes I? More...
 
virtual casacore::Bool getUseSymmetric ()
 Get value of useSymmetric. More...
 
virtual void setBandOrFeedName (const casacore::String elnamo)
 

Protected Member Functions

void fillPBArray ()
 Fill in vp_p array from construction parameters. More...
 
- Protected Member Functions inherited from casa::PBMath1D
 PBMath1D ()
 Protect default constructor: this will do you no good. More...
 
void extentguts (const casacore::CoordinateSystem &coords, const casacore::MDirection &pointing, const casacore::Float fPad, const casacore::Int iChan, casacore::Vector< casacore::Float > &blc, casacore::Vector< casacore::Float > &trc)
 calculate the limited box of the Primary Beam model's support, return in blc and trc (which are NOT contrained to be inside the image More...
 
void refineSize (casacore::Vector< casacore::Float > &blc, casacore::Vector< casacore::Float > &trc, const casacore::IPosition &shape, SkyJones::SizeType)
 push blc lower, trc higher such that they define an image which is a power of 2 in size. More...
 
casacore::ImageInterface
< casacore::Complex > & 
apply (const casacore::ImageInterface< casacore::Complex > &in, casacore::ImageInterface< casacore::Complex > &out, const casacore::MDirection &sp, const casacore::Quantity parAngle, const BeamSquint::SquintType doSquint, casacore::Bool inverse, casacore::Bool conjugate, casacore::Int ipower, casacore::Float cutoff, casacore::Bool forward)
 lower level helping apply methods More...
 
casacore::ImageInterface
< casacore::Float > & 
apply (const casacore::ImageInterface< casacore::Float > &in, casacore::ImageInterface< casacore::Float > &out, const casacore::MDirection &sp, const casacore::Quantity parAngle, const BeamSquint::SquintType doSquint, casacore::Float cutoff, const casacore::Int ipower=4)
 
SkyComponentapply (SkyComponent &in, SkyComponent &out, const casacore::MDirection &sp, const casacore::Quantity frequency, const casacore::Quantity parAngle, const BeamSquint::SquintType doSquint, casacore::Bool inverse, casacore::Bool conjugate, casacore::Int ipower, casacore::Float cutoff, casacore::Bool forward)
 PB and PB^2. More...
 
For wideband beams fill the
tabulated vp_p by the
interpolated beam at the freq
*virtual void 
nearestVPArray (double freq, bool printINFO=true)
 
void symmetrizeSquintedBeam ()
 Helper method to fit a circularly symmetric beam to the squinted RR + LL beam. More...
 
void applyXLine (const casacore::Complex *&in, casacore::Complex *&out, casacore::Float *&rx2, casacore::Complex *&vp, const casacore::Float ry2, const casacore::Int ipower, const casacore::Bool conjugate, const casacore::Bool inverse, const casacore::Bool forward, const casacore::Int nx, const casacore::Int iy, const casacore::Double rmax2, const casacore::Double factor, const casacore::Double inverseIncrementRadius, const casacore::Float cutoff)
 
- Protected Member Functions inherited from casa::PBMathInterface
 PBMathInterface ()
 Dumb constructor: protected, as it won't do you any good! More...
 

Private Attributes

casacore::Vector
< casacore::Double
coeff_p
 
casacore::Matrix
< casacore::Double
wbcoeff_p
 

Additional Inherited Members

- Public Types inherited from casa::PBMathInterface
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 inherited from casa::PBMathInterface
static void namePBClass (const PBMathInterface::PBClass iPB, casacore::String &str)
 Convert enumeration into a string. More...
 
- Static Protected Member Functions inherited from casa::PBMathInterface
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 inherited from casa::PBMath1D
casacore::Vector
< casacore::Complex > 
vp_p
 The parameterized representation is for the VP, not the PB. More...
 
casacore::Vector
< casacore::Complex > 
esvp_p
 Tabulated effective az-symmetrical voltage pattern (optional, depending upon useSymmetric_p) More...
 
casacore::Matrix
< casacore::Complex > 
wbvp_p
 Tabulated voltage pattern for wide band feed First axis is radius, 2nd axis is frequency. More...
 
casacore::Bool wideFit_p
 Switch to use wideband beam fits. More...
 
casacore::Vector
< casacore::Double
wFreqs_p
 Wideband beam fit frequencies. More...
 
casacore::Quantity maximumRadius_p
 Maximum radius allowed in tabulated model. More...
 
casacore::Quantity refFreq_p
 reference frequency: used for squint and other beam paramaters such as width, found in derived types. More...
 
casacore::Double fScale_p
 internal scaling from refFreq_p to 1GHz; used during construction More...
 
casacore::Double inverseIncrementRadius_p
 Increment in radius. More...
 
casacore::Double scale_p
 Scale to convert to tabulated units. More...
 
casacore::CompositeNumber composite_p
 casacore::CompositeNumber (for beam application and the like) More...
 
- Protected Attributes inherited from casa::PBMathInterface
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
 

Detailed Description

PBMath1DIPoly is a 1-D Inverse casacore::Polynomial Expansion for a Primary Beam.

Intended use:

Public interface

Prerequisite

Etymology

PBMath1DIPoly: derived from PBMath1D, implements an Inverse casacore::Polynomial PB and VP

Synopsis

See PBMath1D for a general synopsis of the 1D PB types.

VP(x) = sum_i coeff_i * x ^{2i}, out to maximumRadius (referenced to the reference frequency)

x is in arcminutes, referenced to the reference frequency

This move may make me a bit unpopular: since the PBMath1D constructors construct a Voltage Pattern, the coeficienct for a polynomial type must be in terms of the VP, not the PB. Hence, go back to the original PB data, take the square root, and fit the same type polynomial to the VP data.

Inverse polynomial VP model: fit polynomial to 1/(VP_data). Optionally, you can fit to 1/(VP_data) - 1, ignoring the constant polynomial term so that the PB is constrained to be 1.0 at the beam center.

Example

coef(0) = 1.0; / VLA model
coef(1) = 7.22110e-04;
coef(2) = 1.21421e-07;
coef(3) = 9.68612e-11;
coef(4) = 1.86268e-13;
PBMath1DIPoly ipolyPB(coef, casacore::Quantity(43.0,"'"), casacore::Quantity(1.0,"GHz"));

Motivation

All of the 1-D PB types have everything in common except for the details of their parameterization. This lightweight class deals with those differences: construction, filling the PBArray from construction parameters, and flushing to disk. The inverse polynomial PB type is used for VLA and ATNF models.

To Do

Definition at line 104 of file PBMath1DIPoly.h.

Constructor & Destructor Documentation

casa::PBMath1DIPoly::PBMath1DIPoly ( )
inline

Definition at line 107 of file PBMath1DIPoly.h.

casa::PBMath1DIPoly::PBMath1DIPoly ( const casacore::Vector< casacore::Double > &  coeff,
casacore::Quantity  maxRad,
casacore::Quantity  refFreq,
casacore::Bool  isThisVP = false,
BeamSquint  squint = BeamSquint(casacore::MDirection(casacore::Quantity(0.0,"deg"), casacore::Quantity(0.0,"deg"), casacore::MDirection::Ref(casacore::MDirection::AZEL)), casacore::Quantity(1.0,"GHz")),
casacore::Bool  useSymmetricBeam = false 
)

Instantiation from arguments; default = no squint squint is the offset from pointing center if the casacore::Stokes R beam useSymmetricBeam forces a fit to the squinted beam.

casa::PBMath1DIPoly::PBMath1DIPoly ( const casacore::Matrix< casacore::Double > &  coeff,
const casacore::Vector< casacore::Double > &  freqs,
casacore::Quantity  maxRad,
casacore::Quantity  refFreq,
casacore::Bool  isThisVP = false,
BeamSquint  squint = BeamSquint(casacore::MDirection(casacore::Quantity(0.0,"deg"), casacore::Quantity(0.0,"deg"), casacore::MDirection::Ref(casacore::MDirection::AZEL)), casacore::Quantity(1.0,"GHz")),
casacore::Bool  useSymmetricBeam = false 
)

Instantiation from arguments; default = no squint squint is the offset from pointing center if the casacore::Stokes R beam useSymmetricBeam forces a fit to the squinted beam Each column in coeff corresponds to a frequency in freqs.

casa::PBMath1DIPoly::~PBMath1DIPoly ( )

Clone the object casacore::CountedPtr<PBMathInterface> clone();.

Member Function Documentation

void casa::PBMath1DIPoly::fillPBArray ( )
protectedvirtual

Fill in vp_p array from construction parameters.

Implements casa::PBMath1D.

PBMath1DIPoly& casa::PBMath1DIPoly::operator= ( const PBMath1DIPoly other)

Instantiation from a row in the Beam subTable PBMath1DIPoly(const casacore::Table& BeamSubTable, casacore::Int row, casacore::Bool useSymmetricBeam=false);.

Copy constructor PBMath1DIPoly(const PBMath1DIPoly& other);

Assignment operator, by reference

void casa::PBMath1DIPoly::summary ( casacore::Int  nValues = 0)
virtual

Flush the construction parameters to disk casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow);.

Summarize the construction data for this primary beam

Reimplemented from casa::PBMath1D.

PBMathInterface::PBClass casa::PBMath1DIPoly::whichPBClass ( )
inlinevirtual

Get the type of PB this is.

Implements casa::PBMathInterface.

Definition at line 152 of file PBMath1DIPoly.h.

References casa::PBMathInterface::IPOLY.

Member Data Documentation

casacore::Vector<casacore::Double> casa::PBMath1DIPoly::coeff_p
private

Definition at line 167 of file PBMath1DIPoly.h.

casacore::Matrix<casacore::Double> casa::PBMath1DIPoly::wbcoeff_p
private

Definition at line 168 of file PBMath1DIPoly.h.


The documentation for this class was generated from the following file: