PBMath1DNumeric.h

Classes

PBMath1DNumeric -- 1-D Numeric Primary Beam Model (full description)

class PBMath1DNumeric : public PBMath1D

Interface

Public Members
PBMath1DNumeric()
PBMath1DNumeric(const Vector<Float>& numericArray, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(isThisVP(Quantity(0.0, "deg"), Quantity(0.0, "deg"), isThisVP::Ref(isThisVP::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)
PBMath1DNumeric& operator=(const PBMath1DNumeric& other)
~PBMath1DNumeric()
PBMathInterface::PBClass whichPBClass()
void summary(Int nValues=0)
Protected Members
void fillPBArray()

Description

Prerequisite

Etymology

PBMath1DNumeric: derived from PBMath1D, implements a numeric PB and VP

Synopsis

See PBMath1D for a general synopsis of the 1D 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 PBMath1DNumeric 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");
    PBMath1DNumeric numPB (vp, maxRad, refFreq);
    numPB.applyPB( im1, im2, pointingDir);

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

To Do

Member Description

PBMath1DNumeric()

PBMath1DNumeric(const Vector<Float>& numericArray, Quantity maxRad, Quantity refFreq, Bool isThisVP=False, BeamSquint squint=BeamSquint(isThisVP(Quantity(0.0, "deg"), Quantity(0.0, "deg"), isThisVP::Ref(isThisVP::AZEL)), Quantity(1.0, "GHz")), Bool useSymmetricBeam=False)

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

PBMath1DNumeric& operator=(const PBMath1DNumeric& other)

Instantiation from a row in the Beam subTable PBMath1DNumeric(const Table& BeamSubTable, Int row, Bool useSymmetricBeam=False);

Copy constructor PBMath1DGNumeric(const PBMath1DNumeric& other);

Assignment operator, by reference

~PBMath1DNumeric()

destructor

PBMathInterface::PBClass whichPBClass()

Get the type of PB this is

void summary(Int nValues=0)

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

Summarize the construction data for this primary beam

void fillPBArray()

Fill in vp_p array from construction parameters