casa
$Rev:20696$
|
#include <AWProjectWBFT.h>
Public Member Functions | |
AWProjectWBFT (Int nFacets, Long cachesize, CountedPtr< CFCache > &cfcache, CountedPtr< ConvolutionFunction > &cf, CountedPtr< VisibilityResamplerBase > &visResampler, Bool applyPointingOffset=True, Bool doPBCorr=True, Int tilesize=16, Float paSteps=5.0, Float pbLimit=5e-4, Bool usezero=False, Bool conjBeams_p=True, Bool doublePrecGrid=False) | |
Constructor: cachesize is the size of the cache in words (e.g. | |
AWProjectWBFT (const RecordInterface &stateRec) | |
Construct from a Record containing the AWProjectWBFT state. | |
AWProjectWBFT (const AWProjectWBFT &other) | |
Copy constructor. | |
AWProjectWBFT & | operator= (const AWProjectWBFT &other) |
Assignment operator. | |
~AWProjectWBFT () | |
virtual String | name () const |
Return the name of the machine. | |
Int | findPointingOffsets (const VisBuffer &vb, Array< Float > &l_off, Array< Float > &m_off, Bool Evaluate) |
Bool changed(const VisBuffer& vb) {return vpSJ->changed(vb,1);}; Bool changed(const VisBuffer& vb) {return False;}. | |
void | normalizeAvgPB () |
void | normalizeAvgPB (ImageInterface< Complex > &, ImageInterface< Float > &) |
virtual void | makeSensitivityImage (const VisBuffer &vb, const ImageInterface< Complex > &imageTemplate, ImageInterface< Float > &sensitivityImage) |
This method is called from AWProjectFT to compute the sensitivity image by accumulating in the image domain (i.e. | |
virtual void | makeSensitivityImage (Lattice< Complex > &wtImage, ImageInterface< Float > &sensitivityImage, const Matrix< Float > &sumWt=Matrix< Float >(), const Bool &doFFTNorm=True) |
In AWProjectWBFT and its derivatives, sensitivity image is computed by accumulating weight functions (images) during the first gridding cycle. | |
virtual void | makeSensitivitySqImage (Lattice< Complex > &wtImage, ImageInterface< Complex > &sensitivitySqImage, const Matrix< Float > &sumWt=Matrix< Float >(), const Bool &doFFTNorm=True) |
virtual ImageInterface< Complex > & | getImage (Matrix< Float > &, Bool normalize=True) |
Method used to make normalized image from gridded visibilites. | |
virtual Float | pbFunc (const Float &, const Float &) |
Method used to convert the pixel value of the PB image, passed as pbPixValue, to a value used for PB-normalization. | |
virtual void | finalizeToSky () |
{Float tt=(pbPixValue);return (abs(tt) >= pbLimit)?tt:1.0;}; | |
virtual void | initializeToSky (ImageInterface< Complex > &image, Matrix< Float > &weight, const VisBuffer &vb) |
Initialize transform to Sky plane: initializes the image. | |
void | setObservatoryLocation (const MPosition &mLocation) |
Initialize transform to Visibility plane using the image as a template. | |
virtual Bool | verifyShapes (IPosition shape0, IPosition shape1) |
virtual Bool | computeAvgPB (const Double &, const Double &) |
Returns True if accumulation during gridding to compute the average PB must be done. | |
Protected Member Functions | |
void | ftWeightImage (Lattice< Complex > &wtImage, const Matrix< Float > &sumWt, const Bool &doFFTNorm) |
virtual void setMiscInfo(const Int qualifier) {sensitivityPatternQualifier_p=qualifier;} {qualifier_p = qualifier;taylorQualifier_p = "_MFS_"+String::toString(qualifier_p)+"_";}; | |
virtual void | resampleDataToGrid (Array< Complex > &griddedData, VBStore &vbs, const VisBuffer &vb, Bool &dopsf) |
virtual void | resampleDataToGrid (Array< DComplex > &griddedData, VBStore &vbs, const VisBuffer &vb, Bool &dopsf) |
void | resampleCFToGrid (Array< Complex > &wtsGrid, VBStore &vbs, const VisBuffer &vb) |
virtual void resampleGridToData(VBStore& vbs, const VisBuffer& vb); | |
Protected Attributes | |
Bool | avgPBReady_p |
Bool | resetPBs_p |
Bool | wtImageFTDone_p |
Private Attributes | |
String | tt_pp |
Vector< Int > | fieldIds_p |
TempImage< Complex > | griddedWeights |
TempImage< Complex > | griddedConjWeights |
CFStore | rotatedCFWts_p |
Float | pbNorm |
CountedPtr < VisibilityResamplerBase > | visResamplerWt_p |
Definition at line 41 of file AWProjectWBFT.h.
casa::AWProjectWBFT::AWProjectWBFT | ( | Int | nFacets, |
Long | cachesize, | ||
CountedPtr< CFCache > & | cfcache, | ||
CountedPtr< ConvolutionFunction > & | cf, | ||
CountedPtr< VisibilityResamplerBase > & | visResampler, | ||
Bool | applyPointingOffset = True , |
||
Bool | doPBCorr = True , |
||
Int | tilesize = 16 , |
||
Float | paSteps = 5.0 , |
||
Float | pbLimit = 5e-4 , |
||
Bool | usezero = False , |
||
Bool | conjBeams_p = True , |
||
Bool | doublePrecGrid = False |
||
) |
Constructor: cachesize is the size of the cache in words (e.g.
a few million is a good number), tilesize is the size of the tile used in gridding (cannot be less than 12, 16 works in most cases).
casa::AWProjectWBFT::AWProjectWBFT | ( | const RecordInterface & | stateRec | ) |
Construct from a Record containing the AWProjectWBFT state.
casa::AWProjectWBFT::AWProjectWBFT | ( | const AWProjectWBFT & | other | ) | [inline] |
casa::AWProjectWBFT::~AWProjectWBFT | ( | ) | [inline] |
Definition at line 74 of file AWProjectWBFT.h.
virtual Bool casa::AWProjectWBFT::computeAvgPB | ( | const Double & | , |
const Double & | |||
) | [inline, virtual] |
Returns True if accumulation during gridding to compute the average PB must be done.
Reimplemented in casa::MultiTermAWProjectWBFT.
Definition at line 159 of file AWProjectWBFT.h.
References avgPBReady_p, and casa::False.
virtual void casa::AWProjectWBFT::finalizeToSky | ( | ) | [virtual] |
{Float tt=(pbPixValue);return (abs(tt) >= pbLimit)?tt:1.0;};
{Float tt=sqrt(pbPixValue);return (abs(tt) >= pbLimit)?tt:1.0;};
Reimplemented from casa::AWProjectFT.
Int casa::AWProjectWBFT::findPointingOffsets | ( | const VisBuffer & | , |
Array< Float > & | , | ||
Array< Float > & | , | ||
Bool | Evaluate | ||
) | [virtual] |
Bool changed(const VisBuffer& vb) {return vpSJ->changed(vb,1);}; Bool changed(const VisBuffer& vb) {return False;}.
Reimplemented from casa::AWProjectFT.
void casa::AWProjectWBFT::ftWeightImage | ( | Lattice< Complex > & | wtImage, |
const Matrix< Float > & | sumWt, | ||
const Bool & | doFFTNorm | ||
) | [protected] |
virtual void setMiscInfo(const Int qualifier) {sensitivityPatternQualifier_p=qualifier;} {qualifier_p = qualifier;taylorQualifier_p = "_MFS_"+String::toString(qualifier_p)+"_";};
virtual void ComputeResiduals(VisBuffer&vb, Bool useCorrected) {};
virtual ImageInterface<Complex>& casa::AWProjectWBFT::getImage | ( | Matrix< Float > & | , |
Bool | normalize = True |
||
) | [virtual] |
Method used to make normalized image from gridded visibilites.
This calls makeSensitivityImage() to make the sensitivity image and AWProjectFT::getImage() to make the image from gridded visibilites. AWProjectFT::getImage() internally calls normalizeImage() which uses the sensitivty image computed by makeSensitivtyImage().
Reimplemented from casa::AWProjectFT.
Reimplemented in casa::MultiTermAWProjectWBFT.
virtual void casa::AWProjectWBFT::initializeToSky | ( | ImageInterface< Complex > & | image, |
Matrix< Float > & | weight, | ||
const VisBuffer & | vb | ||
) | [virtual] |
Initialize transform to Sky plane: initializes the image.
Reimplemented from casa::AWProjectFT.
virtual void casa::AWProjectWBFT::makeSensitivityImage | ( | const VisBuffer & | vb, |
const ImageInterface< Complex > & | imageTemplate, | ||
ImageInterface< Float > & | sensitivityImage | ||
) | [virtual] |
This method is called from AWProjectFT to compute the sensitivity image by accumulating in the image domain (i.e.
directly accumulate the Primay Beam functions). This is called from findConvFunction() so that sensitivity pattern is also pre-computed along with the convolution functions. This in-turn calls the ATerm::makeAverageResponse().
For AWProjectWBFT class of FTMachines, this just issues a log message indicating that this is only setting up things for accumulation of weight images in the first gridding cycle. The actual sensitivity patterns are computed by overloaded function below.
Reimplemented from casa::AWProjectFT.
virtual void casa::AWProjectWBFT::makeSensitivityImage | ( | Lattice< Complex > & | wtImage, |
ImageInterface< Float > & | sensitivityImage, | ||
const Matrix< Float > & | sumWt = Matrix< Float >() , |
||
const Bool & | doFFTNorm = True |
||
) | [virtual] |
In AWProjectWBFT and its derivatives, sensitivity image is computed by accumulating weight functions (images) during the first gridding cycle.
AWProjectFT::makeSensitivityImage() is overloaded in AWProjectWBFT and only issues a log message.
The following method is used to Fourier transform normalize the accumulated weight images. doFFTNorm when True, the FFT normalization (by pixel volume) is also done.
Reimplemented from casa::AWProjectFT.
Reimplemented in casa::MultiTermAWProjectWBFT.
virtual void casa::AWProjectWBFT::makeSensitivitySqImage | ( | Lattice< Complex > & | wtImage, |
ImageInterface< Complex > & | sensitivitySqImage, | ||
const Matrix< Float > & | sumWt = Matrix< Float >() , |
||
const Bool & | doFFTNorm = True |
||
) | [virtual] |
virtual String casa::AWProjectWBFT::name | ( | ) | const [inline, virtual] |
Return the name of the machine.
Reimplemented from casa::AWProjectFT.
Reimplemented in casa::MultiTermAWProjectWBFT.
Definition at line 76 of file AWProjectWBFT.h.
void casa::AWProjectWBFT::normalizeAvgPB | ( | ) | [virtual] |
Reimplemented from casa::AWProjectFT.
void casa::AWProjectWBFT::normalizeAvgPB | ( | ImageInterface< Complex > & | , |
ImageInterface< Float > & | |||
) | [inline, virtual] |
Reimplemented from casa::AWProjectFT.
Reimplemented in casa::MultiTermAWProjectWBFT.
Definition at line 82 of file AWProjectWBFT.h.
AWProjectWBFT& casa::AWProjectWBFT::operator= | ( | const AWProjectWBFT & | other | ) |
Assignment operator.
Referenced by AWProjectWBFT().
virtual Float casa::AWProjectWBFT::pbFunc | ( | const Float & | , |
const Float & | |||
) | [inline, virtual] |
Method used to convert the pixel value of the PB image, passed as pbPixValue, to a value used for PB-normalization.
Typically, this will depend on the units of the "PB image" constructed by the makeSensitivtyImage() methods. pbLimit is the fractional pb-gain below which imaging is not required (this value is typically the user-defined parameter in the private member variable pbLimit_p).
Reimplemented from casa::AWProjectFT.
Definition at line 139 of file AWProjectWBFT.h.
void casa::AWProjectWBFT::resampleCFToGrid | ( | Array< Complex > & | wtsGrid, |
VBStore & | vbs, | ||
const VisBuffer & | vb | ||
) | [protected] |
virtual void resampleGridToData(VBStore& vbs, const VisBuffer& vb);
virtual void casa::AWProjectWBFT::resampleDataToGrid | ( | Array< Complex > & | griddedData, |
VBStore & | vbs, | ||
const VisBuffer & | vb, | ||
Bool & | dopsf | ||
) | [protected, virtual] |
Reimplemented from casa::AWProjectFT.
virtual void casa::AWProjectWBFT::resampleDataToGrid | ( | Array< DComplex > & | griddedData, |
VBStore & | vbs, | ||
const VisBuffer & | vb, | ||
Bool & | dopsf | ||
) | [protected, virtual] |
Reimplemented from casa::AWProjectFT.
void casa::AWProjectWBFT::setObservatoryLocation | ( | const MPosition & | mLocation | ) | [inline] |
Initialize transform to Visibility plane using the image as a template.
The image is loaded and Fourier transformed.
Reimplemented from casa::AWProjectFT.
Definition at line 150 of file AWProjectWBFT.h.
References casa::FTMachine::mLocation_p.
virtual Bool casa::AWProjectWBFT::verifyShapes | ( | IPosition | shape0, |
IPosition | shape1 | ||
) | [inline, virtual] |
Reimplemented from casa::AWProjectFT.
Definition at line 152 of file AWProjectWBFT.h.
References casa::False.
Bool casa::AWProjectWBFT::avgPBReady_p [protected] |
Definition at line 180 of file AWProjectWBFT.h.
Referenced by casa::MultiTermAWProjectWBFT::computeAvgPB(), and computeAvgPB().
Vector<Int> casa::AWProjectWBFT::fieldIds_p [private] |
Definition at line 184 of file AWProjectWBFT.h.
TempImage<Complex> casa::AWProjectWBFT::griddedConjWeights [private] |
Definition at line 185 of file AWProjectWBFT.h.
TempImage<Complex> casa::AWProjectWBFT::griddedWeights [private] |
Definition at line 185 of file AWProjectWBFT.h.
Float casa::AWProjectWBFT::pbNorm [private] |
Definition at line 187 of file AWProjectWBFT.h.
Bool casa::AWProjectWBFT::resetPBs_p [protected] |
Definition at line 180 of file AWProjectWBFT.h.
CFStore casa::AWProjectWBFT::rotatedCFWts_p [private] |
Definition at line 186 of file AWProjectWBFT.h.
String casa::AWProjectWBFT::tt_pp [private] |
Definition at line 183 of file AWProjectWBFT.h.
Definition at line 188 of file AWProjectWBFT.h.
Bool casa::AWProjectWBFT::wtImageFTDone_p [protected] |
Definition at line 180 of file AWProjectWBFT.h.