BeamSkyJones.h
Classes
- BeamSkyJones -- beam-like sky-plane effects for the SkyEquation (full description)
Interface
- Public Members
- const Quantity &skyPositionThreshold = Quantity(180,"deg"))
- virtual ~BeamSkyJones() = 0
- virtual void showState(LogIO& os)
- ImageInterface<Complex>& apply(const ImageInterface<Complex>& in, ImageInterface<Complex>& out, const Complex& vb, Int row, Bool forward=True)
- ImageInterface<Float>& applySquare(const ImageInterface<Float>& in, ImageInterface<Float>& out, const VisBuffer& vb, Int row)
- SkyComponent& apply(SkyComponent& in, SkyComponent& out, const VisBuffer& vb, Int row, Bool forward = True)
- SkyComponent& applySquare(SkyComponent& in, SkyComponent& out, const VisBuffer& vb, Int row)
- virtual void reset()
- virtual Bool changed(const VisBuffer& vb, Int row)
- virtual Bool change(const VisBuffer& vb)
- virtual Bool changedBuffer(const VisBuffer& vb, Int row1, Int& row2)
- void update(const VisBuffer& vb, Int row)
- virtual void assure (const VisBuffer& vb, Int row)
- virtual Type type()
- virtual ImageInterface<Complex>& applyGradient(ImageInterface<Complex>& result, const Complex& vb, Int row)
- virtual SkyComponent& applyGradient(SkyComponent& result, const VisBuffer& vb, Int row)
- virtual Bool isSolveable()
- virtual void initializeGradients()
- virtual void finalizeGradients()
- virtual void addGradients(const VisBuffer& vb, Int row, const Float sumwt, const Float chisq, const Matrix<Complex>& c, const Matrix<Float>& f)
- virtual Bool solve (SkyEquation& se)
- void setPBMath(const String &telescope, PBMath &myPBmath, const Int &antennaID = -1, const Int &feedID = -1)
- Bool getPBMath(uInt whichAnt, PBMath &myPBMath) const
- Bool getPBMath(const String &telescope, PBMath &myPBMath, const Int &antennaID = -1, const Int &feedID = -1) const
- Quantity getPAIncrement()
- Quantity getSkyPositionThreshold()
- Bool isHomogeneous() const
- ImageRegion* extent (const ImageInterface<Complex>& im, const Complex& vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const VisBuffer::SizeType sizeType=VisBuffer::COMPOSITE)
- ImageRegion* extent (const ImageInterface<Float>& im, const VisBuffer& vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const VisBuffer::SizeType sizeType=VisBuffer::COMPOSITE)
- virtual void summary(Int n=0)
- Private Members
- void updatePBMathIndices(const VisBuffer &vb, Int row) const
- Protected Members
- Bool directionsCloseEnough(const MDirection &dir1, const MDirection &dir2) const throw(AipsError)
- Int indexTelescope(const String & compareTelescope, const Int &compareAntenna=-1, const Int &compareFeed=-1) const
Prerequisite
Etymology
BeamSkyJones, derived from SkyJones, describes an interface to
beam-based SkyJones objects. Like SkyJones, it too is an Abstract
Base Class, but implements the beam-related methods.
Synopsis
Motivation
The properties of sky-plane based calibration effects must be described
for the SkyEquation; this class
encapsulates the antenna beam-based aspects which are present in at least
a few other specific SkyJones (VPSkyJones and DBeamSkyJones).
To Do
- Solvable part needs implementation: we need to derive an
image of gradients of the elements of the Jones matrix. See VisJones
for how to do this.
- The MS, version II, will have a beam subtable, which will have PBMaths
for each antenna. Until this becomes available, we need to do some
fudging; for example, we
Member Description
const Quantity &skyPositionThreshold = Quantity(180,"deg"))
def= no beam squint offsets
def= assume there is no change of
this operator due to position offset
Virtual destructor (this is a virtual base class)
Print out information concerning the state of this object
ImageInterface<Complex>& apply(const ImageInterface<Complex>& in, ImageInterface<Complex>& out, const Complex& vb, Int row, Bool forward=True)
ImageInterface<Float>& applySquare(const ImageInterface<Float>& in, ImageInterface<Float>& out, const VisBuffer& vb, Int row)
Apply Jones matrix to an image (and adjoint)
No "applyInverse" is available from the SkyJones classes,
you can get them directly from PBMath or you can get
the equivalent effect by dividing by grad grad Chi^2
in ImageSkyModel.
Apply Jones matrix to a sky component (and adjoint)
virtual Bool changed(const VisBuffer& vb, Int row)
Understand if things have changed since last PB application
Has this operator changed since the last Application?
(or more properly, since the last update() )
Understand if things have changed since last PB application
Does the operator change in this visbuffer or since the last call?
May not be useful -- check it out: m.a.h. Dec 30 1999
virtual Bool changedBuffer(const VisBuffer& vb, Int row1, Int& row2)
Understand if things have changed since last PB application
Does this operator changed in this VisBuffer,
starting with row1?
If yes, we return in row2, the last row that has the
same SkyJones as row1.
NOTE: need to first call changed(const VisBuffer& vb, Int row) and
shield the user from the case where the fieldID has changed
(which only changes in blocks)
Understand if things have changed since last PB application
Update the FieldID, Telescope, pointingDirection, Parallactic angle info
virtual void assure (const VisBuffer& vb, Int row)
Understand if things have changed since last PB application
if (changed) {update()}
virtual void reset()
Understand if things have changed since last PB application
virtual Type type()
Return the type of this Jones matrix (actual type of derived class).
virtual ImageInterface<Complex>& applyGradient(ImageInterface<Complex>& result, const Complex& vb, Int row)
Apply gradient
Is this solveable?
Initialize for gradient search
Finalize for gradient search
virtual void addGradients(const VisBuffer& vb, Int row, const Float sumwt, const Float chisq, const Matrix<Complex>& c, const Matrix<Float>& f)
Add to Gradient Chisq
Solve
void setPBMath(const String &telescope, PBMath &myPBmath, const Int &antennaID = -1, const Int &feedID = -1)
Manage the PBMath objects
set the PB based on telescope name, antennaID and feedID
If antennaID or feedID is -1, the PBMath object is set for
all antennae or feeds, respectively. These are the default
values to retain the previous interface.
Note. It would be nice to change the interface and make antennaID
and feedID the second and the third parameter, respectively.
Bool getPBMath(uInt whichAnt, PBMath &myPBMath) const
Manage the PBMath objects
get the PBMath object; returns False if that one doesn't exist,
True if it does exist and is OK
whichAnt is an index into an array of PBMaths, which is different
for all telescope/antenna/feed combinations
Not sure why we need such a low-level method declared as public,
retained to preserve old interface
Bool getPBMath(const String &telescope, PBMath &myPBMath, const Int &antennaID = -1, const Int &feedID = -1) const
Manage the PBMath objects
get the PBMath object; returns False if that one doesn't exist,
True if it does exist and is OK
antennaID and feedID default to -1 to preserve the old interface
TODO: change the interface and make antennaID and feedID the
second and third parameter respectively to have a better looking code
Manage the PBMath objects
Return true if all antennas share a common VP
Manage the PBMath objects
ImageRegion* extent (const ImageInterface<Complex>& im, const Complex& vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const VisBuffer::SizeType sizeType=VisBuffer::COMPOSITE)
Get the ImageRegion of the primary beam on an Image for a given pointing
Note: 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: extra padding over the primary beam supporrt,
fractional (ie, 1.2 for 20% padding), in all directions.
(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 ImageRegion includes all Stokes and Frequency Channels
present in the input image.
ImageRegion* extent (const ImageInterface<Float>& im, const VisBuffer& vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const VisBuffer::SizeType sizeType=VisBuffer::COMPOSITE)
virtual void summary(Int n=0)
summarize the PBMaths contained here.
n = -1 => terse table
n = 0 => table plus constructor values
n = m => plot m samples of the PB profile
True if the operator has been applied at least once
update the indices cache. This method could be made protected in the
future (need access functions for lastUpdateIndex?_p to benefit from it)
Cache will be valid for a given VisBuffer and row
return True if two directions are close enough to consider the
operator unchanged, False otherwise
Int indexTelescope(const String & compareTelescope, const Int &compareAntenna=-1, const Int &compareFeed=-1) const
return index of compareTelescope, compareAntenna and compareFeed in
myTelescopes_p, myAntennaIDs and myFeedIDs; -1 if not found
if compareAntenna or compareTelescope is -1, this means that the
PBMath class is the same for all antennae/feeds. An exception will
be raised, if separate PBMath objects have been assigned by setPBMath
for different feeds/antennae but -1 is used for query.
It would be good to rename this function to indexBeams as this name
is more appropriate.