casa
5.7.0-16
|
beam-like sky-plane effects for the SkyEquation More...
#include <BeamSkyJones.h>
Public Member Functions | |
BeamSkyJones (const casacore::Quantity ¶llacticAngleIncrement=casacore::Quantity(720.0,"deg"), BeamSquint::SquintType doSquint=BeamSquint::NONE, const casacore::Quantity &skyPositionThreshold=casacore::Quantity(180,"deg")) | |
Eventually, the casacore::MS will have all the beam information in its Beam Subtable. More... | |
virtual | ~BeamSkyJones ()=0 |
this operator due to position offset More... | |
virtual void | showState (casacore::LogIO &os) |
Print out information concerning the state of this object. More... | |
casacore::ImageInterface < casacore::Complex > & | apply (const casacore::ImageInterface< casacore::Complex > &in, casacore::ImageInterface< casacore::Complex > &out, const vi::VisBuffer2 &vb, casacore::Int row, casacore::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. More... | |
casacore::ImageInterface < casacore::Float > & | apply (const casacore::ImageInterface< casacore::Float > &in, casacore::ImageInterface< casacore::Float > &out, const vi::VisBuffer2 &vb, casacore::Int row) |
casacore::ImageInterface < casacore::Float > & | applySquare (const casacore::ImageInterface< casacore::Float > &in, casacore::ImageInterface< casacore::Float > &out, const vi::VisBuffer2 &vb, casacore::Int row) |
SkyComponent & | apply (SkyComponent &in, SkyComponent &out, const vi::VisBuffer2 &vb, casacore::Int row, casacore::Bool forward=true) |
Apply Jones matrix to a sky component (and adjoint) More... | |
SkyComponent & | applySquare (SkyComponent &in, SkyComponent &out, const vi::VisBuffer2 &vb, casacore::Int row) |
virtual void | reset () |
Understand if things have changed since last PB application. More... | |
virtual casacore::Bool | changed (const vi::VisBuffer2 &vb, casacore::Int row) |
Has this operator changed since the last Application? (or more properly, since the last update()) More... | |
virtual casacore::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. More... | |
virtual casacore::Bool | changedBuffer (const vi::VisBuffer2 &vb, casacore::Int row1, casacore::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. More... | |
void | update (const vi::VisBuffer2 &vb, casacore::Int row) |
Update the FieldID, Telescope, pointingDirection, Parallactic angle info. More... | |
virtual void | assure (const vi::VisBuffer2 &vb, casacore::Int row) |
if (changed) {update()} More... | |
virtual casa::SkyJones::Type | type () |
Return the type of this Jones matrix (actual type of derived class). More... | |
virtual casacore::ImageInterface < casacore::Complex > & | applyGradient (casacore::ImageInterface< casacore::Complex > &result, const vi::VisBuffer2 &vb, casacore::Int row) |
Apply gradient. More... | |
virtual SkyComponent & | applyGradient (SkyComponent &result, const vi::VisBuffer2 &vb, casacore::Int row) |
virtual casacore::Bool | isSolveable () |
Is this solveable? More... | |
virtual void | initializeGradients () |
Initialize for gradient search. More... | |
virtual void | finalizeGradients () |
Finalize for gradient search. More... | |
virtual void | addGradients (const vi::VisBuffer2 &vb, casacore::Int row, const casacore::Float sumwt, const casacore::Float chisq, const casacore::Matrix< casacore::Complex > &c, const casacore::Matrix< casacore::Float > &f) |
Add to Gradient Chisq. More... | |
void | setPBMath (const casacore::String &telescope, PBMath &myPBmath, const casacore::Int &antennaID=-1, const casacore::Int &feedID=-1) |
Solve virtual casacore::Bool solve (SkyEquation& se); More... | |
casacore::Bool | getPBMath (casacore::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 More... | |
casacore::Bool | getPBMath (const casacore::String &telescope, PBMath &myPBMath, const casacore::Int &antennaID=-1, const casacore::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 More... | |
casacore::Quantity | getPAIncrement () |
casacore::Quantity | getSkyPositionThreshold () |
casacore::Bool | isHomogeneous () const |
Return true if all antennas share a common VP. More... | |
casacore::ImageRegion * | extent (const casacore::ImageInterface< casacore::Complex > &im, const vi::VisBuffer2 &vb, const casacore::Int irow=-1, const casacore::Float fPad=1.2, const casacore::Int iChan=0, const casa::SkyJones::SizeType sizeType=casa::SkyJones::COMPOSITE) |
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::ImageRegion * | extent (const casacore::ImageInterface< casacore::Float > &im, const vi::VisBuffer2 &vb, const casacore::Int irow=-1, const casacore::Float fPad=1.2, const casacore::Int iChan=0, const casa::SkyJones::SizeType sizeType=casa::SkyJones::COMPOSITE) |
virtual void | summary (casacore::Int n=0) |
summarize the PBMaths contained here. More... | |
casacore::String | telescope () |
return the telescope it is on at this state More... | |
virtual casacore::Int | support (const vi::VisBuffer2 &vb, const casacore::CoordinateSystem &cs) |
Get an idea of the support of the PB in number of pixels. More... | |
Public Member Functions inherited from casa::refim::SkyJones | |
SkyJones () | |
Allowed types of VisJones matrices enum Type{E,T,F,D}; More... | |
virtual | ~SkyJones () |
Destructor. More... | |
virtual void | setThreshold (const casacore::Float t) |
virtual casacore::Float | threshold () |
Protected Member Functions | |
casacore::Bool | directionsCloseEnough (const casacore::MDirection &dir1, const casacore::MDirection &dir2) const throw (casacore::AipsError) |
return true if two directions are close enough to consider the operator unchanged, false otherwise More... | |
casacore::Int | indexTelescope (const casacore::String &compareTelescope, const casacore::Int &compareAntenna=-1, const casacore::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. More... | |
casacore::MDirection | convertDir (const vi::VisBuffer2 &vb, const casacore::MDirection &inDir, const casacore::MDirection::Types outType) |
Protected Member Functions inherited from casa::refim::SkyJones | |
virtual casacore::String | typeName () |
Could be over-ridden if necessary. More... | |
Protected Attributes | |
casacore::CountedPtr < VisBufferUtil > | vbutil_p |
Protected Attributes inherited from casa::refim::SkyJones | |
casacore::Float | threshold_p |
Private Member Functions | |
void | updatePBMathIndices (const vi::VisBuffer2 &vb, casacore::Int row) const |
update the indices cache. More... | |
beam-like sky-plane effects for the SkyEquation
Public interface
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.
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).
Definition at line 94 of file BeamSkyJones.h.
casa::refim::BeamSkyJones::BeamSkyJones | ( | const casacore::Quantity & | parallacticAngleIncrement = casacore::Quantity(720.0,"deg") , |
BeamSquint::SquintType | doSquint = BeamSquint::NONE , |
||
const casacore::Quantity & | skyPositionThreshold = casacore::Quantity(180,"deg") |
||
) |
Eventually, the casacore::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 casacore::MS information
|
pure virtual |
this operator due to position offset
Virtual destructor (this is a virtual base class)
|
virtual |
Add to Gradient Chisq.
Implements casa::refim::SkyJones.
|
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 |
Implements casa::refim::SkyJones.
|
virtual |
Apply Jones matrix to a sky component (and adjoint)
Implements casa::refim::SkyJones.
|
virtual |
Apply gradient.
|
virtual |
|
virtual |
Implements casa::refim::SkyJones.
|
virtual |
Implements casa::refim::SkyJones.
|
virtual |
if (changed) {update()}
Implements casa::refim::SkyJones.
|
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 |
Has this operator changed since the last Application? (or more properly, since the last update())
Implements casa::refim::SkyJones.
|
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, casacore::Int row) and shield the user from the case where the fieldID has changed (which only changes in blocks)
Implements casa::refim::SkyJones.
|
protected |
|
protected |
return true if two directions are close enough to consider the operator unchanged, false otherwise
|
virtual |
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).
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 casacore::ImageRegion includes all casacore::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 |
Implements casa::refim::SkyJones.
|
virtual |
Finalize for gradient search.
Implements casa::refim::SkyJones.
|
inline |
Definition at line 231 of file BeamSkyJones.h.
References parallacticAngleIncrement_p.
casacore::Bool casa::refim::BeamSkyJones::getPBMath | ( | casacore::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
casacore::Bool casa::refim::BeamSkyJones::getPBMath | ( | const casacore::String & | telescope, |
PBMath & | myPBMath, | ||
const casacore::Int & | antennaID = -1 , |
||
const casacore::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
|
inline |
Definition at line 233 of file BeamSkyJones.h.
References skyPositionThreshold_p.
|
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 |
Initialize for gradient search.
Implements casa::refim::SkyJones.
casacore::Bool casa::refim::BeamSkyJones::isHomogeneous | ( | ) | const |
Return true if all antennas share a common VP.
|
inlinevirtual |
Is this solveable?
Implements casa::refim::SkyJones.
Reimplemented in casa::refim::VPSkyJones.
Definition at line 187 of file BeamSkyJones.h.
|
virtual |
Understand if things have changed since last PB application.
Reset to pristine state
Implements casa::refim::SkyJones.
void casa::refim::BeamSkyJones::setPBMath | ( | const casacore::String & | telescope, |
PBMath & | myPBmath, | ||
const casacore::Int & | antennaID = -1 , |
||
const casacore::Int & | feedID = -1 |
||
) |
Solve
virtual casacore::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 |
Print out information concerning the state of this object.
|
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 |
Get an idea of the support of the PB in number of pixels.
Implements casa::refim::SkyJones.
|
virtual |
return the telescope it is on at this state
Implements casa::refim::SkyJones.
|
inlinevirtual |
Return the type of this Jones matrix (actual type of derived class).
Implements casa::refim::SkyJones.
Reimplemented in casa::refim::VPSkyJones.
Definition at line 175 of file BeamSkyJones.h.
References casa::SkyJones::E.
void casa::refim::BeamSkyJones::update | ( | const vi::VisBuffer2 & | vb, |
casacore::Int | row | ||
) |
Update the FieldID, Telescope, pointingDirection, Parallactic angle info.
|
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
|
private |
Definition at line 286 of file BeamSkyJones.h.
|
mutableprivate |
Definition at line 328 of file BeamSkyJones.h.
|
private |
Definition at line 282 of file BeamSkyJones.h.
|
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 299 of file BeamSkyJones.h.
|
private |
Definition at line 280 of file BeamSkyJones.h.
|
private |
Definition at line 284 of file BeamSkyJones.h.
|
private |
which the operator is considered to be changed (in radians)
Definition at line 294 of file BeamSkyJones.h.
|
private |
Definition at line 285 of file BeamSkyJones.h.
|
mutableprivate |
correct row in the VisBuffer
Definition at line 324 of file BeamSkyJones.h.
|
mutableprivate |
Definition at line 325 of file BeamSkyJones.h.
|
mutableprivate |
is filled for the correct VisBuffer.
The value is used for comparison only
Definition at line 322 of file BeamSkyJones.h.
|
mutableprivate |
cache of the indices to the PBMaths container for antenna/feed 1 and 2
Definition at line 318 of file BeamSkyJones.h.
|
private |
Antenna IDs (parallel with PBMaths)
Definition at line 313 of file BeamSkyJones.h.
|
private |
Feed IDs (parallel with PBMaths)
Definition at line 315 of file BeamSkyJones.h.
|
private |
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 308 of file BeamSkyJones.h.
|
private |
Names of telescopes (parralel with PBMaths.
Definition at line 310 of file BeamSkyJones.h.
|
private |
Definition at line 288 of file BeamSkyJones.h.
Referenced by getPAIncrement().
|
private |
beyond which the operator is considered to be changed (in radians)
Definition at line 291 of file BeamSkyJones.h.
Referenced by getSkyPositionThreshold().
|
private |
Definition at line 278 of file BeamSkyJones.h.
|
protected |
Definition at line 355 of file BeamSkyJones.h.