#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 VisBuffer2 &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 VisBuffer2 &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 VisBuffer2 &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. | |
virtual void | setCFCache (CountedPtr< CFCache > &cfc, const Bool resetCFC=True) |
virtual void setMiscInfo(const Int qualifier) {sensitivityPatternQualifier_p=qualifier;} {qualifier_p = qualifier;taylorQualifier_p = "_MFS_"+StringtoString(qualifier_p)+"_";}; | |
Protected Member Functions | |
virtual void | ftWeightImage (Lattice< Complex > &wtImage, const Matrix< Float > &sumWt, const Bool &doFFTNorm) |
virtual void | resampleDataToGrid (Array< Complex > &griddedData, VBStore &vbs, const VisBuffer2 &vb, Bool &dopsf) |
virtual void | resampleDataToGrid (Array< DComplex > &griddedData, VBStore &vbs, const VisBuffer2 &vb, Bool &dopsf) |
void | resampleCFToGrid (Array< Complex > &wtsGrid, VBStore &vbs, const VisBuffer2 &vb) |
virtual void resampleGridToData(VBStore& vbs, const VisBuffer2& 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 |
Bool | oneTimeMessage_p |
// These ugly methods (ugly due to their flirtation with FORTRAN) should go! |
Definition at line 42 of file AWProjectWBFT.h.
casa::refim::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::refim::AWProjectWBFT::AWProjectWBFT | ( | const RecordInterface & | stateRec | ) |
Construct from a Record containing the AWProjectWBFT state.
casa::refim::AWProjectWBFT::AWProjectWBFT | ( | const AWProjectWBFT & | other | ) | [inline] |
casa::refim::AWProjectWBFT::~AWProjectWBFT | ( | ) | [inline] |
Definition at line 75 of file AWProjectWBFT.h.
virtual Bool casa::refim::AWProjectWBFT::computeAvgPB | ( | const Double & | , | |
const Double & | ||||
) | [inline, virtual] |
Returns True if accumulation during gridding to compute the average PB must be done.
Definition at line 160 of file AWProjectWBFT.h.
References avgPBReady_p, and casacore::False.
virtual void casa::refim::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::refim::AWProjectFT.
Int casa::refim::AWProjectWBFT::findPointingOffsets | ( | const VisBuffer2 & | , | |
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::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::ftWeightImage | ( | Lattice< Complex > & | wtImage, | |
const Matrix< Float > & | sumWt, | |||
const Bool & | doFFTNorm | |||
) | [protected, virtual] |
Reimplemented in casa::refim::AWProjectWBFTNew.
virtual ImageInterface<Complex>& casa::refim::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::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::initializeToSky | ( | ImageInterface< Complex > & | image, | |
Matrix< Float > & | weight, | |||
const VisBuffer2 & | vb | |||
) | [virtual] |
Initialize transform to Sky plane: initializes the image.
Reimplemented from casa::refim::AWProjectFT.
virtual void casa::refim::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::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::makeSensitivityImage | ( | const VisBuffer2 & | 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::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::makeSensitivitySqImage | ( | Lattice< Complex > & | wtImage, | |
ImageInterface< Complex > & | sensitivitySqImage, | |||
const Matrix< Float > & | sumWt = Matrix< Float >() , |
|||
const Bool & | doFFTNorm = True | |||
) | [virtual] |
virtual String casa::refim::AWProjectWBFT::name | ( | ) | const [inline, virtual] |
Return the name of the machine.
Reimplemented from casa::refim::AWProjectFT.
Reimplemented in casa::refim::AWProjectWBFTNew.
Definition at line 77 of file AWProjectWBFT.h.
void casa::refim::AWProjectWBFT::normalizeAvgPB | ( | ImageInterface< Complex > & | , | |
ImageInterface< Float > & | ||||
) | [inline, virtual] |
Reimplemented from casa::refim::AWProjectFT.
Definition at line 83 of file AWProjectWBFT.h.
void casa::refim::AWProjectWBFT::normalizeAvgPB | ( | ) | [virtual] |
----------------------------------------------------------------------
Reimplemented from casa::refim::AWProjectFT.
AWProjectWBFT& casa::refim::AWProjectWBFT::operator= | ( | const AWProjectWBFT & | other | ) |
virtual Float casa::refim::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::refim::AWProjectFT.
Definition at line 140 of file AWProjectWBFT.h.
void casa::refim::AWProjectWBFT::resampleCFToGrid | ( | Array< Complex > & | wtsGrid, | |
VBStore & | vbs, | |||
const VisBuffer2 & | vb | |||
) | [protected] |
virtual void resampleGridToData(VBStore& vbs, const VisBuffer2& vb);
virtual void casa::refim::AWProjectWBFT::resampleDataToGrid | ( | Array< DComplex > & | griddedData, | |
VBStore & | vbs, | |||
const VisBuffer2 & | vb, | |||
Bool & | dopsf | |||
) | [protected, virtual] |
Reimplemented from casa::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::resampleDataToGrid | ( | Array< Complex > & | griddedData, | |
VBStore & | vbs, | |||
const VisBuffer2 & | vb, | |||
Bool & | dopsf | |||
) | [protected, virtual] |
Reimplemented from casa::refim::AWProjectFT.
virtual void casa::refim::AWProjectWBFT::setCFCache | ( | CountedPtr< CFCache > & | cfc, | |
const Bool | resetCFC = True | |||
) | [virtual] |
virtual void setMiscInfo(const Int qualifier) {sensitivityPatternQualifier_p=qualifier;} {qualifier_p = qualifier;taylorQualifier_p = "_MFS_"+StringtoString(qualifier_p)+"_";};
virtual void ComputeResiduals(VisBuffer2&vb, Bool useCorrected) {};
Reimplemented from casa::refim::FTMachine.
void casa::refim::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::refim::AWProjectFT.
Definition at line 151 of file AWProjectWBFT.h.
References casa::refim::FTMachine::mLocation_p.
virtual Bool casa::refim::AWProjectWBFT::verifyShapes | ( | IPosition | shape0, | |
IPosition | shape1 | |||
) | [inline, virtual] |
Reimplemented from casa::refim::AWProjectFT.
Definition at line 153 of file AWProjectWBFT.h.
References casacore::False.
Bool casa::refim::AWProjectWBFT::avgPBReady_p [protected] |
Definition at line 183 of file AWProjectWBFT.h.
Referenced by computeAvgPB().
Vector<Int> casa::refim::AWProjectWBFT::fieldIds_p [private] |
Definition at line 187 of file AWProjectWBFT.h.
TempImage<Complex> casa::refim::AWProjectWBFT::griddedConjWeights [private] |
Definition at line 188 of file AWProjectWBFT.h.
TempImage<Complex> casa::refim::AWProjectWBFT::griddedWeights [private] |
Definition at line 188 of file AWProjectWBFT.h.
Bool casa::refim::AWProjectWBFT::oneTimeMessage_p [private] |
// These ugly methods (ugly due to their flirtation with FORTRAN) should go!
virtual void runFortranGet(Matrix<Double>& uvw,Vector<Double>& dphase, Cube<Complex>& visdata, IPosition& s, Int& Conj, Cube<Int>& flags,Vector<Int>& rowFlags, Int& rownr,Vector<Double>& actualOffset, Array<Complex>* dataPtr, Int& aNx, Int& aNy, Int& npol, Int& nchan, VisBuffer2& vb,Int& Nant_p, Int& scanNo, Double& sigma, Array<Float>& raoffsets, Array<Float>& decoffsets, Double area, Int& doGrad,Int paIndex); virtual void runFortranPut(Matrix<Double>& uvw,Vector<Double>& dphase, const Complex& visdata_p, IPosition& s, Int& Conj, Cube<Int>& flags,Vector<Int>& rowFlags, const Matrix<Float>& weight, Int& rownr,Vector<Double>& actualOffset, Array<Complex>& dataPtr, Int& aNx, Int& aNy, Int& npol, Int& nchan, const VisBuffer2& vb,Int& Nant_p, Int& scanNo, Double& sigma, Array<Float>& raoffsets, Array<Float>& decoffsets, Matrix<Double>& sumWeight, Double& area, Int& doGrad, Int& doPSF,Int paIndex); virtual void runFortranGetGrad(Matrix<Double>& uvw,Vector<Double>& dphase, Cube<Complex>& visdata, IPosition& s, Cube<Complex>& gradVisAzData, Cube<Complex>& gradVisElData, Int& Conj, Cube<Int>& flags,Vector<Int>& rowFlags, Int& rownr,Vector<Double>& actualOffset, Array<Complex>* dataPtr, Int& aNx, Int& aNy, Int& npol, Int& nchan, VisBuffer2& vb,Int& Nant_p, Int& scanNo, Double& sigma, Array<Float>& l_off, Array<Float>& m_off, Double area, Int& doGrad, Int paIndex);
Definition at line 243 of file AWProjectWBFT.h.
Float casa::refim::AWProjectWBFT::pbNorm [private] |
Definition at line 190 of file AWProjectWBFT.h.
Bool casa::refim::AWProjectWBFT::resetPBs_p [protected] |
Definition at line 183 of file AWProjectWBFT.h.
Definition at line 189 of file AWProjectWBFT.h.
String casa::refim::AWProjectWBFT::tt_pp [private] |
Definition at line 186 of file AWProjectWBFT.h.
CountedPtr<VisibilityResamplerBase> casa::refim::AWProjectWBFT::visResamplerWt_p [private] |
Definition at line 191 of file AWProjectWBFT.h.
Bool casa::refim::AWProjectWBFT::wtImageFTDone_p [protected] |
Definition at line 183 of file AWProjectWBFT.h.