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 Member Functions | Private Attributes | List of all members
casa::PBMath2DImage Class Reference

2-D Image Primary Beam Model More...

#include <PBMath2DImage.h>

Inheritance diagram for casa::PBMath2DImage:
casa::PBMath2D casa::PBMathInterface

Public Member Functions

 PBMath2DImage ()
 
 PBMath2DImage (casacore::ImageInterface< casacore::Float > &reJonesImage)
 Instantiation from arguments; only an image is needed. More...
 
 PBMath2DImage (casacore::ImageInterface< casacore::Float > &reJonesImage, casacore::ImageInterface< casacore::Float > &imJonesImage)
 
 PBMath2DImage (const casacore::ImageInterface< casacore::Complex > &jonesImage)
 
PBMath2DImageoperator= (const PBMath2DImage &other)
 Copy constructor PBMath2DGImage(const PBMath2DImage& other);. More...
 
 ~PBMath2DImage ()
 destructor More...
 
PBMathInterface::PBClass whichPBClass ()
 Get the type of PB this is. More...
 
void summary (casacore::Int nValues=0)
 Summarize the construction data for this primary beam. More...
 
- Public Member Functions inherited from casa::PBMath2D
 PBMath2D ()
 
virtual ~PBMath2D ()
 
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)
 
- 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

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)
 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, casacore::Int ipower)
 
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)
 
virtual casacore::Int support (const casacore::CoordinateSystem &cs)
 
- Protected Member Functions inherited from casa::PBMathInterface
 PBMathInterface ()
 Dumb constructor: protected, as it won't do you any good! More...
 

Private Member Functions

void checkJonesCongruent (casacore::ImageInterface< casacore::Float > &reJones, casacore::ImageInterface< casacore::Float > &imJones)
 Check for congruency. More...
 
void checkImageCongruent (casacore::ImageInterface< casacore::Float > &image)
 
void updateJones (const casacore::CoordinateSystem &coords, const casacore::IPosition &shape, const casacore::MDirection &pc, const casacore::Quantity &paAngle)
 Update the Jones Matrix. More...
 
void applyJones (const casacore::Array< casacore::Float > *reJones, const casacore::Array< casacore::Float > *imJones, const casacore::Array< casacore::Complex > &in, casacore::Array< casacore::Complex > &out, casacore::Vector< casacore::Int > &polmap, casacore::Bool inverse, casacore::Bool conjugate, casacore::Int ipower, casacore::Float cutoff, casacore::Bool circular=true, casacore::Bool forward=true)
 casacore::Complex to Complex More...
 
void applyJonesFast (const casacore::Float *&reJones, const casacore::Float *&imJones, const casacore::Array< casacore::Complex > &in, casacore::Array< casacore::Complex > &out, casacore::Vector< casacore::Int > &polmap, casacore::Bool, casacore::Bool, casacore::Int ipower, casacore::Float, casacore::Bool circular, casacore::Bool forward)
 
void applyJonesFastX (const casacore::Float *&reJones, const casacore::Float *&imJones, const casacore::Complex *&in, casacore::Complex *&outstor, const casacore::Int *&polmap, casacore::Bool, casacore::Bool, casacore::Int ipower, casacore::Float, casacore::Bool circular, casacore::Bool forward, const casacore::Int ix, const casacore::Int nx, const casacore::Int ny, const casacore::Int npol)
 
void applyJones (const casacore::Array< casacore::Float > *reJones, const casacore::Array< casacore::Float > *imJones, const casacore::Array< casacore::Float > &in, casacore::Array< casacore::Float > &out, casacore::Vector< casacore::Int > &polmap, casacore::Float cutoff, casacore::Bool circular=true)
 casacore::Float to Float More...
 

Private Attributes

casacore::TempImage
< casacore::Float > * 
reJonesImage_p
 
casacore::TempImage
< casacore::Float > * 
reRegridJonesImage_p
 
casacore::TempImage
< casacore::Float > * 
imJonesImage_p
 
casacore::TempImage
< casacore::Float > * 
imRegridJonesImage_p
 
casacore::Vector
< casacore::Double > * 
incrementsReJones_p
 
casacore::Vector
< casacore::Double > * 
incrementsImJones_p
 
casacore::Vector
< casacore::Double > * 
referencePixelReJones_p
 
casacore::Vector
< casacore::Double > * 
referencePixelImJones_p
 
casacore::Float pa_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::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

2-D Image Primary Beam Model

Intended use:

Public interface

Prerequisite

Etymology

PBMath2DImage: derived from PBMath2D, implements PB and VP from sampled 2D VP

Synopsis

See PBMath2D for a general synopsis of the 2D PB types.

The user supplies a vector which is a numerical representation of a voltage [attern (hey, if you have a PB, just take the square root, and look out for sidelobes which could be negative). The first element in the vector needs to be 1.0, the center of the voltage pattern. The last element of the vector is the value of the VP at the maximumRadius. The maximumRadius and the reference frequency at which the tabulated VP is intended are also required for construction. The PBMath2DImage constructor proceeds by performing SINC interpolation on the input vector to generate the highly oversampled lookup vector.

Example

numPB.applyPB(im1, im2, pointingDir);

Motivation

All of the 2-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 Image type is very handy: someone can take a sample illumination pattern, FT, and take a slice of the resulting voltage pattern and construct a VP from that slice.

To Do

Definition at line 104 of file PBMath2DImage.h.

Constructor & Destructor Documentation

casa::PBMath2DImage::PBMath2DImage ( )
casa::PBMath2DImage::PBMath2DImage ( casacore::ImageInterface< casacore::Float > &  reJonesImage)

Instantiation from arguments; only an image is needed.

casa::PBMath2DImage::PBMath2DImage ( casacore::ImageInterface< casacore::Float > &  reJonesImage,
casacore::ImageInterface< casacore::Float > &  imJonesImage 
)
casa::PBMath2DImage::PBMath2DImage ( const casacore::ImageInterface< casacore::Complex > &  jonesImage)
casa::PBMath2DImage::~PBMath2DImage ( )

destructor

Member Function Documentation

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

lower level helping apply methods

Implements casa::PBMathInterface.

virtual casacore::ImageInterface<casacore::Float>& casa::PBMath2DImage::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,
casacore::Int  ipower 
)
protectedvirtual

Implements casa::PBMathInterface.

virtual SkyComponent& casa::PBMath2DImage::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 
)
protectedvirtual

Implements casa::PBMathInterface.

void casa::PBMath2DImage::applyJones ( const casacore::Array< casacore::Float > *  reJones,
const casacore::Array< casacore::Float > *  imJones,
const casacore::Array< casacore::Complex > &  in,
casacore::Array< casacore::Complex > &  out,
casacore::Vector< casacore::Int > &  polmap,
casacore::Bool  inverse,
casacore::Bool  conjugate,
casacore::Int  ipower,
casacore::Float  cutoff,
casacore::Bool  circular = true,
casacore::Bool  forward = true 
)
private

casacore::Complex to Complex

void casa::PBMath2DImage::applyJones ( const casacore::Array< casacore::Float > *  reJones,
const casacore::Array< casacore::Float > *  imJones,
const casacore::Array< casacore::Float > &  in,
casacore::Array< casacore::Float > &  out,
casacore::Vector< casacore::Int > &  polmap,
casacore::Float  cutoff,
casacore::Bool  circular = true 
)
private

casacore::Float to Float

void casa::PBMath2DImage::applyJonesFast ( const casacore::Float *&  reJones,
const casacore::Float *&  imJones,
const casacore::Array< casacore::Complex > &  in,
casacore::Array< casacore::Complex > &  out,
casacore::Vector< casacore::Int > &  polmap,
casacore::Bool  ,
casacore::Bool  ,
casacore::Int  ipower,
casacore::Float  ,
casacore::Bool  circular,
casacore::Bool  forward 
)
private
void casa::PBMath2DImage::applyJonesFastX ( const casacore::Float *&  reJones,
const casacore::Float *&  imJones,
const casacore::Complex *&  in,
casacore::Complex *&  outstor,
const casacore::Int *&  polmap,
casacore::Bool  ,
casacore::Bool  ,
casacore::Int  ipower,
casacore::Float  ,
casacore::Bool  circular,
casacore::Bool  forward,
const casacore::Int  ix,
const casacore::Int  nx,
const casacore::Int  ny,
const casacore::Int  npol 
)
private
void casa::PBMath2DImage::checkImageCongruent ( casacore::ImageInterface< casacore::Float > &  image)
private
void casa::PBMath2DImage::checkJonesCongruent ( casacore::ImageInterface< casacore::Float > &  reJones,
casacore::ImageInterface< casacore::Float > &  imJones 
)
private

Check for congruency.

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

Copy constructor PBMath2DGImage(const PBMath2DImage& other);.

Assignment operator, by reference

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

Summarize the construction data for this primary beam.

Reimplemented from casa::PBMath2D.

virtual casacore::Int casa::PBMath2DImage::support ( const casacore::CoordinateSystem cs)
protectedvirtual

Reimplemented from casa::PBMath2D.

void casa::PBMath2DImage::updateJones ( const casacore::CoordinateSystem coords,
const casacore::IPosition shape,
const casacore::MDirection pc,
const casacore::Quantity paAngle 
)
private

Update the Jones Matrix.

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

Get the type of PB this is.

Implements casa::PBMathInterface.

Definition at line 126 of file PBMath2DImage.h.

References casa::PBMathInterface::IMAGE.

Member Data Documentation

casacore::TempImage<casacore::Float>* casa::PBMath2DImage::imJonesImage_p
private

Definition at line 231 of file PBMath2DImage.h.

casacore::TempImage<casacore::Float>* casa::PBMath2DImage::imRegridJonesImage_p
private

Definition at line 232 of file PBMath2DImage.h.

casacore::Vector<casacore::Double>* casa::PBMath2DImage::incrementsImJones_p
private

Definition at line 235 of file PBMath2DImage.h.

casacore::Vector<casacore::Double>* casa::PBMath2DImage::incrementsReJones_p
private

Definition at line 234 of file PBMath2DImage.h.

casacore::Float casa::PBMath2DImage::pa_p
private

Definition at line 240 of file PBMath2DImage.h.

casacore::Vector<casacore::Double>* casa::PBMath2DImage::referencePixelImJones_p
private

Definition at line 238 of file PBMath2DImage.h.

casacore::Vector<casacore::Double>* casa::PBMath2DImage::referencePixelReJones_p
private

Definition at line 237 of file PBMath2DImage.h.

casacore::TempImage<casacore::Float>* casa::PBMath2DImage::reJonesImage_p
private

Definition at line 229 of file PBMath2DImage.h.

casacore::TempImage<casacore::Float>* casa::PBMath2DImage::reRegridJonesImage_p
private

Definition at line 230 of file PBMath2DImage.h.


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