casa::refim::BeamSkyJones Class Reference

beam-like sky-plane effects for the SkyEquation More...

#include <BeamSkyJones.h>

Inheritance diagram for casa::refim::BeamSkyJones:
casa::refim::SkyJones casa::refim::VPSkyJones

List of all members.

Public Member Functions

 BeamSkyJones (const Quantity &parallacticAngleIncrement=Quantity(720.0,"deg"), BeamSquint::SquintType doSquint=BeamSquint::NONE, const Quantity &skyPositionThreshold=Quantity(180,"deg"))
 Eventually, the MS will have all the beam information in its Beam Subtable.
virtual ~BeamSkyJones ()=0
 this operator due to position offset
virtual void showState (LogIO &os)
 Print out information concerning the state of this object.
ImageInterface< Complex > & apply (const ImageInterface< Complex > &in, ImageInterface< Complex > &out, const vi::VisBuffer2 &vb, Int row, Bool forward=True)
 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.
ImageInterface< Float > & apply (const ImageInterface< Float > &in, ImageInterface< Float > &out, const vi::VisBuffer2 &vb, Int row)
ImageInterface< Float > & applySquare (const ImageInterface< Float > &in, ImageInterface< Float > &out, const vi::VisBuffer2 &vb, Int row)
SkyComponentapply (SkyComponent &in, SkyComponent &out, const vi::VisBuffer2 &vb, Int row, Bool forward=True)
 Apply Jones matrix to a sky component (and adjoint).
SkyComponentapplySquare (SkyComponent &in, SkyComponent &out, const vi::VisBuffer2 &vb, Int row)
virtual void reset ()
 Understand if things have changed since last PB application.
virtual Bool changed (const vi::VisBuffer2 &vb, Int row)
 Has this operator changed since the last Application? (or more properly, since the last update() ).
virtual Bool change (const vi::VisBuffer2 &vb)
 Does the operator change in this visbuffer or since the last call? May not be useful -- check it out: m.a.h.
virtual Bool changedBuffer (const vi::VisBuffer2 &vb, Int row1, Int &row2)
 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.
void update (const vi::VisBuffer2 &vb, Int row)
 Update the FieldID, Telescope, pointingDirection, Parallactic angle info.
virtual void assure (const vi::VisBuffer2 &vb, Int row)
 if (changed) {update()}
virtual casa::SkyJones::Type type ()
 Return the type of this Jones matrix (actual type of derived class).
virtual ImageInterface< Complex > & applyGradient (ImageInterface< Complex > &result, const vi::VisBuffer2 &vb, Int row)
 Apply gradient.
virtual SkyComponentapplyGradient (SkyComponent &result, const vi::VisBuffer2 &vb, Int row)
virtual Bool isSolveable ()
 Is this solveable?
virtual void initializeGradients ()
 Initialize for gradient search.
virtual void finalizeGradients ()
 Finalize for gradient search.
virtual void addGradients (const vi::VisBuffer2 &vb, Int row, const Float sumwt, const Float chisq, const Matrix< Complex > &c, const Matrix< Float > &f)
 Add to Gradient Chisq.
void setPBMath (const String &telescope, PBMath &myPBmath, const Int &antennaID=-1, const Int &feedID=-1)
 Solve virtual Bool solve (SkyEquation& se);.
Bool getPBMath (uInt whichAnt, PBMath &myPBMath) const
 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
 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
Quantity getPAIncrement ()
Quantity getSkyPositionThreshold ()
Bool isHomogeneous () const
 Return true if all antennas share a common VP.
ImageRegion * extent (const ImageInterface< Complex > &im, const vi::VisBuffer2 &vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const casa::SkyJones::SizeType sizeType=casa::SkyJones::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).
ImageRegion * extent (const ImageInterface< Float > &im, const vi::VisBuffer2 &vb, const Int irow=-1, const Float fPad=1.2, const Int iChan=0, const casa::SkyJones::SizeType sizeType=casa::SkyJones::COMPOSITE)
virtual void summary (Int n=0)
 summarize the PBMaths contained here.
String telescope ()
 return the telescope it is on at this state
virtual Int support (const vi::VisBuffer2 &vb, const casa::CoordinateSystem &cs)
 Get an idea of the support of the PB in number of pixels.

Protected Member Functions

Bool directionsCloseEnough (const MDirection &dir1, const MDirection &dir2) const throw (AipsError)
 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.

Private Member Functions

void updatePBMathIndices (const vi::VisBuffer2 &vb, Int row) const
 update the indices cache.

Private Attributes

String telescope_p
Int lastFieldId_p
Int lastArrayId_p
Int lastMSId_p
BeamSquint::SquintType doSquint_p
Double parallacticAngleIncrement_p
Double skyPositionThreshold_p
 beyond which the operator is considered to be changed (in radians)
Block< Double > lastParallacticAngles_p
 which the operator is considered to be changed (in radians)
Block< MDirection > lastDirections_p
 used when the operator was applied last time.
Block< PBMathmyPBMaths_p
 used when the operator was applied last time.
Block< String > myTelescopes_p
 Names of telescopes (parralel with PBMaths.
Block< Int > myAntennaIDs_p
 Antenna IDs (parallel with PBMaths).
Block< Int > myFeedIDs_p
 Feed IDs (parallel with PBMaths).
CountedPtr< vi::VisBuffer2lastUpdateVisBuffer_p
 cache of the indices to the PBMaths container for antenna/feed 1 and 2
Int lastUpdateRow_p
 is filled for the correct VisBuffer.
Int lastUpdateIndex1_p
 correct row in the VisBuffer
Int lastUpdateIndex2_p
Bool hasBeenApplied

Detailed Description

beam-like sky-plane effects for the SkyEquation

Intended use:

Public interface

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

Definition at line 88 of file BeamSkyJones.h.


Constructor & Destructor Documentation

casa::refim::BeamSkyJones::BeamSkyJones ( const Quantity &  parallacticAngleIncrement = Quantity(720.0,"deg"),
BeamSquint::SquintType  doSquint = BeamSquint::NONE,
const Quantity &  skyPositionThreshold = Quantity(180,"deg") 
)

Eventually, the MS will have all the beam information in its Beam Subtable.

Till then, we either guess the PB to use or explicitly define it upon construction. Construct from a Measurement Set, figure out the most appropriate PBMath object from MS information

virtual casa::refim::BeamSkyJones::~BeamSkyJones (  )  [pure virtual]

this operator due to position offset

Virtual destructor (this is a virtual base class)


Member Function Documentation

virtual void casa::refim::BeamSkyJones::addGradients ( const vi::VisBuffer2 vb,
Int  row,
const Float  sumwt,
const Float  chisq,
const Matrix< Complex > &  c,
const Matrix< Float > &  f 
) [virtual]

Add to Gradient Chisq.

Implements casa::refim::SkyJones.

SkyComponent& casa::refim::BeamSkyJones::apply ( SkyComponent in,
SkyComponent out,
const vi::VisBuffer2 vb,
Int  row,
Bool  forward = True 
) [virtual]

Apply Jones matrix to a sky component (and adjoint).

Implements casa::refim::SkyJones.

ImageInterface<Float>& casa::refim::BeamSkyJones::apply ( const ImageInterface< Float > &  in,
ImageInterface< Float > &  out,
const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Implements casa::refim::SkyJones.

ImageInterface<Complex>& casa::refim::BeamSkyJones::apply ( const ImageInterface< Complex > &  in,
ImageInterface< Complex > &  out,
const vi::VisBuffer2 vb,
Int  row,
Bool  forward = True 
) [virtual]

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.

Implements casa::refim::SkyJones.

virtual SkyComponent& casa::refim::BeamSkyJones::applyGradient ( SkyComponent result,
const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Implements casa::refim::SkyJones.

virtual ImageInterface<Complex>& casa::refim::BeamSkyJones::applyGradient ( ImageInterface< Complex > &  result,
const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Apply gradient.

Implements casa::refim::SkyJones.

SkyComponent& casa::refim::BeamSkyJones::applySquare ( SkyComponent in,
SkyComponent out,
const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Implements casa::refim::SkyJones.

ImageInterface<Float>& casa::refim::BeamSkyJones::applySquare ( const ImageInterface< Float > &  in,
ImageInterface< Float > &  out,
const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Implements casa::refim::SkyJones.

virtual void casa::refim::BeamSkyJones::assure ( const vi::VisBuffer2 vb,
Int  row 
) [virtual]

if (changed) {update()}

Implements casa::refim::SkyJones.

virtual Bool casa::refim::BeamSkyJones::change ( const vi::VisBuffer2 vb  )  [virtual]

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

Implements casa::refim::SkyJones.

virtual Bool casa::refim::BeamSkyJones::changed ( const vi::VisBuffer2 vb,
Int  row 
) [virtual]

Has this operator changed since the last Application? (or more properly, since the last update() ).

Implements casa::refim::SkyJones.

virtual Bool casa::refim::BeamSkyJones::changedBuffer ( const vi::VisBuffer2 vb,
Int  row1,
Int &  row2 
) [virtual]

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)

Implements casa::refim::SkyJones.

Bool casa::refim::BeamSkyJones::directionsCloseEnough ( const MDirection &  dir1,
const MDirection &  dir2 
) const throw (AipsError) [protected]

return True if two directions are close enough to consider the operator unchanged, False otherwise

ImageRegion* casa::refim::BeamSkyJones::extent ( const ImageInterface< Float > &  im,
const vi::VisBuffer2 vb,
const Int  irow = -1,
const Float  fPad = 1.2,
const Int  iChan = 0,
const casa::SkyJones::SizeType  sizeType = casa::SkyJones::COMPOSITE 
) [virtual]

Implements casa::refim::SkyJones.

ImageRegion* casa::refim::BeamSkyJones::extent ( const ImageInterface< Complex > &  im,
const vi::VisBuffer2 vb,
const Int  irow = -1,
const Float  fPad = 1.2,
const Int  iChan = 0,
const casa::SkyJones::SizeType  sizeType = casa::SkyJones::COMPOSITE 
) [virtual]

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. COMMENTING out for now as this depend on PBMathInterface and which depends back on SkyJones::sizeType

Implements casa::refim::SkyJones.

virtual void casa::refim::BeamSkyJones::finalizeGradients (  )  [virtual]

Finalize for gradient search.

Implements casa::refim::SkyJones.

Quantity casa::refim::BeamSkyJones::getPAIncrement (  )  [inline]

Definition at line 225 of file BeamSkyJones.h.

References parallacticAngleIncrement_p.

Bool casa::refim::BeamSkyJones::getPBMath ( const String &  telescope,
PBMath myPBMath,
const Int &  antennaID = -1,
const Int &  feedID = -1 
) const

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

Bool casa::refim::BeamSkyJones::getPBMath ( uInt  whichAnt,
PBMath myPBMath 
) const

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

Quantity casa::refim::BeamSkyJones::getSkyPositionThreshold (  )  [inline]

Definition at line 227 of file BeamSkyJones.h.

References skyPositionThreshold_p.

Int casa::refim::BeamSkyJones::indexTelescope ( const String &  compareTelescope,
const Int &  compareAntenna = -1,
const Int &  compareFeed = -1 
) const [protected]

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.

virtual void casa::refim::BeamSkyJones::initializeGradients (  )  [virtual]

Initialize for gradient search.

Implements casa::refim::SkyJones.

Bool casa::refim::BeamSkyJones::isHomogeneous (  )  const

Return true if all antennas share a common VP.

virtual Bool casa::refim::BeamSkyJones::isSolveable (  )  [inline, virtual]

Is this solveable?

Implements casa::refim::SkyJones.

Reimplemented in casa::refim::VPSkyJones.

Definition at line 181 of file BeamSkyJones.h.

References casacore::False.

virtual void casa::refim::BeamSkyJones::reset (  )  [virtual]

Understand if things have changed since last PB application.

Reset to pristine state

Implements casa::refim::SkyJones.

void casa::refim::BeamSkyJones::setPBMath ( const String &  telescope,
PBMath myPBmath,
const Int &  antennaID = -1,
const Int &  feedID = -1 
)

Solve virtual Bool solve (SkyEquation& se);.

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.

virtual void casa::refim::BeamSkyJones::showState ( LogIO &  os  )  [virtual]

Print out information concerning the state of this object.

virtual void casa::refim::BeamSkyJones::summary ( Int  n = 0  )  [virtual]

summarize the PBMaths contained here.

n = -1 => terse table n = 0 => table plus constructor values n = m => plot m samples of the PB profile

virtual Int casa::refim::BeamSkyJones::support ( const vi::VisBuffer2 vb,
const casa::CoordinateSystem &  cs 
) [virtual]

Get an idea of the support of the PB in number of pixels.

String casa::refim::BeamSkyJones::telescope (  )  [virtual]

return the telescope it is on at this state

Implements casa::refim::SkyJones.

virtual casa::SkyJones::Type casa::refim::BeamSkyJones::type (  )  [inline, virtual]

Return the type of this Jones matrix (actual type of derived class).

Implements casa::refim::SkyJones.

Reimplemented in casa::refim::VPSkyJones.

Definition at line 169 of file BeamSkyJones.h.

References casa::SkyJones::E.

void casa::refim::BeamSkyJones::update ( const vi::VisBuffer2 vb,
Int  row 
)

Update the FieldID, Telescope, pointingDirection, Parallactic angle info.

void casa::refim::BeamSkyJones::updatePBMathIndices ( const vi::VisBuffer2 vb,
Int  row 
) const [private]

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


Member Data Documentation

Definition at line 280 of file BeamSkyJones.h.

Definition at line 322 of file BeamSkyJones.h.

Definition at line 276 of file BeamSkyJones.h.

Block<MDirection> casa::refim::BeamSkyJones::lastDirections_p [private]

used when the operator was applied last time.

One value in radians for each beam model in PBMaths. A zero-length block means that the operator has never been applied

Definition at line 293 of file BeamSkyJones.h.

Definition at line 274 of file BeamSkyJones.h.

Definition at line 278 of file BeamSkyJones.h.

which the operator is considered to be changed (in radians)

Definition at line 288 of file BeamSkyJones.h.

correct row in the VisBuffer

Definition at line 318 of file BeamSkyJones.h.

Definition at line 319 of file BeamSkyJones.h.

is filled for the correct VisBuffer.

The value is used for comparison only

Definition at line 316 of file BeamSkyJones.h.

cache of the indices to the PBMaths container for antenna/feed 1 and 2

Definition at line 312 of file BeamSkyJones.h.

Antenna IDs (parallel with PBMaths).

Definition at line 307 of file BeamSkyJones.h.

Feed IDs (parallel with PBMaths).

Definition at line 309 of file BeamSkyJones.h.

used when the operator was applied last time.

One element for each beam model in PBMaths. A zero-length block means that the operator has never been applied

One or more PBMaths (a common one for the entire array, or one for each antenna) This requires some sorting out for heterogeneous arrays!

Definition at line 302 of file BeamSkyJones.h.

Names of telescopes (parralel with PBMaths.

Definition at line 304 of file BeamSkyJones.h.

Definition at line 282 of file BeamSkyJones.h.

Referenced by getPAIncrement().

beyond which the operator is considered to be changed (in radians)

Definition at line 285 of file BeamSkyJones.h.

Referenced by getSkyPositionThreshold().

Definition at line 272 of file BeamSkyJones.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1