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

Virtual base class defining the Primary Beam interface. More...

#include <PBMathInterface.h>

Inheritance diagram for casa::PBMathInterface:
casa::PBMath1D casa::PBMath2D casa::PBMath1DAiry casa::PBMath1DCosPoly casa::PBMath1DEVLA casa::PBMath1DGauss casa::PBMath1DIPoly casa::PBMath1DNumeric casa::PBMath1DPoly casa::PBMath2DImage

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...
 

Public Member Functions

 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)
 
virtual PBClass whichPBClass ()=0
 Which PBClass is this one? More...
 
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 casacore::ImageRegionextent (const casacore::ImageInterface< casacore::Complex > &im, const casacore::MDirection &pointing, const casacore::Int row, const casacore::Float fPad, const casacore::Int iChan, const SkyJones::SizeType)=0
 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...
 
virtual casacore::ImageRegionextent (const casacore::ImageInterface< casacore::Float > &im, const casacore::MDirection &pointing, const casacore::Int row, const casacore::Float fPad, const casacore::Int iChan, const SkyJones::SizeType)=0
 
virtual casacore::Int support (const casacore::CoordinateSystem &cs)=0
 
virtual void summary (casacore::Int nValues=0)
 Summarize the Voltage Pattern; For PBMath1D, list nValues worth of the PB array. More...
 
virtual casacore::Bool ok ()=0
 Is state of PBMath object OK? More...
 
virtual void setBandOrFeedName (const casacore::String elnamo)
 

Static Public Member Functions

static void namePBClass (const PBMathInterface::PBClass iPB, casacore::String &str)
 Convert enumeration into a string. More...
 

Protected Member Functions

 PBMathInterface ()
 Dumb constructor: protected, as it won't do you any good! More...
 
virtual
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)=0
 lower level helping apply methods More...
 
virtual
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)=0
 
virtual 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)=0
 

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...
 

Detailed Description

Virtual base class defining the Primary Beam interface.

Intended use:

Public interface

Prerequisite

Etymology

PBMathInterface defines the interface to PB Math objects, the encapsulations of the PB mathematical functioning

Synopsis

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.

Example

Motivation

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.

To Do

Definition at line 114 of file PBMathInterface.h.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

casa::PBMathInterface::PBMathInterface ( casacore::Bool  isThisVP,
BeamSquint  squint,
casacore::Bool  useSymmetricBeam 
)

Useful constructor.

virtual casa::PBMathInterface::~PBMathInterface ( )
pure virtual

virtual destructor

casa::PBMathInterface::PBMathInterface ( )
protected

Dumb constructor: protected, as it won't do you any good!

Member Function Documentation

virtual casacore::ImageInterface<casacore::Complex>& casa::PBMathInterface::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 
)
protectedpure virtual

lower level helping apply methods

Implemented in casa::PBMath1D, and casa::PBMath2DImage.

virtual casacore::ImageInterface<casacore::Float>& casa::PBMathInterface::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 
)
protectedpure virtual

Implemented in casa::PBMath1D, and casa::PBMath2DImage.

virtual SkyComponent& casa::PBMathInterface::apply ( 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 
)
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)

static casacore::Float casa::PBMathInterface::asFloat ( const casacore::Complex &  value)
inlinestaticprotected

Functions to deal with conversions to Float.

Definition at line 307 of file PBMathInterface.h.

static casacore::Float casa::PBMathInterface::asFloat ( const casacore::DComplex &  value)
inlinestaticprotected

Definition at line 308 of file PBMathInterface.h.

static casacore::Float casa::PBMathInterface::asFloat ( const casacore::Float value)
inlinestaticprotected

Definition at line 309 of file PBMathInterface.h.

References casacore::value().

static casacore::Float casa::PBMathInterface::asFloat ( const casacore::Double value)
inlinestaticprotected

Definition at line 310 of file PBMathInterface.h.

References casacore::value().

virtual casacore::ImageRegion* casa::PBMathInterface::extent ( const casacore::ImageInterface< casacore::Complex > &  im,
const casacore::MDirection pointing,
const casacore::Int  row,
const casacore::Float  fPad,
const casacore::Int  iChan,
const SkyJones::SizeType   
)
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.

virtual casacore::ImageRegion* casa::PBMathInterface::extent ( const casacore::ImageInterface< casacore::Float > &  im,
const casacore::MDirection pointing,
const casacore::Int  row,
const casacore::Float  fPad,
const casacore::Int  iChan,
const SkyJones::SizeType   
)
pure virtual

Implemented in casa::PBMath1D, and casa::PBMath2D.

virtual casacore::Bool casa::PBMathInterface::getUseSymmetric ( )
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 void casa::PBMathInterface::namePBClass ( const PBMathInterface::PBClass  iPB,
casacore::String str 
)
static

Convert enumeration into a string.

virtual casacore::Bool casa::PBMathInterface::ok ( )
pure virtual

Is state of PBMath object OK?

Implemented in casa::PBMath1D, and casa::PBMath2D.

virtual void casa::PBMathInterface::setBandOrFeedName ( const casacore::String  elnamo)
inlinevirtual

Definition at line 257 of file PBMathInterface.h.

References bandOrFeedName_p.

virtual void casa::PBMathInterface::setUseSymmetric ( casacore::Bool  useSym = true)
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 void casa::PBMathInterface::summary ( casacore::Int  nValues = 0)
virtual
virtual casacore::Int casa::PBMathInterface::support ( const casacore::CoordinateSystem cs)
pure virtual
virtual PBClass casa::PBMathInterface::whichPBClass ( )
pure virtual

Friends And Related Function Documentation

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;

Definition at line 120 of file PBMathInterface.h.

Member Data Documentation

casacore::String casa::PBMathInterface::bandOrFeedName_p
protected

Definition at line 331 of file PBMathInterface.h.

Referenced by setBandOrFeedName().

casacore::Bool casa::PBMathInterface::isThisVP_p
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.

BeamSquint casa::PBMathInterface::squint_p
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.

casacore::Bool casa::PBMathInterface::useSymmetricBeam_p
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().


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