PBMath2DImage.h

Classes

PBMath2DImage -- 2-D Image Primary Beam Model (full description)

class PBMath2DImage : public PBMath2D

Interface

Public Members
PBMath2DImage()
PBMath2DImage(ImageInterface<Float>& reJonesImage)
PBMath2DImage(ImageInterface<Float>& reJonesImage, ImageInterface<Float>& imJonesImage)
PBMath2DImage& operator=(const PBMath2DImage& other)
~PBMath2DImage()
PBMathInterface::PBClass whichPBClass()
void summary(Int nValues=0)
Protected Members
ImageInterface<Float>& apply(const ImageInterface<Float>& in, ImageInterface<Float>& out, const MDirection& sp, const Quantity parAngle, const BeamSquint::SquintType doSquint, Float cutoff)
Private Members
void checkJonesCongruent(ImageInterface<Float>& reJones, ImageInterface<Float>& imJones)
void checkImageCongruent(ImageInterface<Float>& image)
void updateJones(const CoordinateSystem& coords, const IPosition& shape, const MDirection& pc, const Quantity& paAngle)
void applyJones(const Array<Float>* reJones, const Array<Float>* imJones, const Array<Float>& in, Array<Float>& out, Vector<Int>& polmap, Float cutoff, Bool circular=True)

Description

Prerequisite

Etymology

PBMath2DImage: derived from PBMath2D, implements a numeric PB and 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

    Vector<Float> vp(10);
    vp(0) = 1.0f;
    vp(1) = 0.932f;
    vp(2) = 0.7462f;
    vp(3) = 0.4914f;
    vp(4) = 0.2308f;
    vp(5) = 0.02183f;   // first null
    vp(6) = -0.1005f;
    vp(7) = -0.1318f;
    vp(8) = -0.09458f;
    vp(9) = -0.0269f;
    Quantity maxRad(1.032,"deg");  
    Quantity refFreq(1.414, "GHz");
    PBMath2DImage numPB (vp, maxRad, refFreq);
    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

Member Description

PBMath2DImage()

PBMath2DImage(ImageInterface<Float>& reJonesImage)

Instantiation from arguments; only an image is needed

PBMath2DImage(ImageInterface<Float>& reJonesImage, ImageInterface<Float>& imJonesImage)

PBMath2DImage& operator=(const PBMath2DImage& other)

Copy constructor PBMath2DGImage(const PBMath2DImage& other);

Assignment operator, by reference

~PBMath2DImage()

destructor

PBMathInterface::PBClass whichPBClass()

Get the type of PB this is

void summary(Int nValues=0)

Summarize the construction data for this primary beam

ImageInterface<Float>& apply(const ImageInterface<Float>& in, ImageInterface<Float>& out, const MDirection& sp, const Quantity parAngle, const BeamSquint::SquintType doSquint, Float cutoff)

void checkJonesCongruent(ImageInterface<Float>& reJones, ImageInterface<Float>& imJones)

Check for congruency

void checkImageCongruent(ImageInterface<Float>& image)

void updateJones(const CoordinateSystem& coords, const IPosition& shape, const MDirection& pc, const Quantity& paAngle)

Update the Jones Matrix

void applyJones(const Array<Float>* reJones, const Array<Float>* imJones, const Array<Float>& in, Array<Float>& out, Vector<Int>& polmap, Float cutoff, Bool circular=True)

Float to Float