casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
casa::WOnlyProjectFT Class Reference

#include <WOnlyProjectFT.h>

Inheritance diagram for casa::WOnlyProjectFT:
casa::FTMachine

List of all members.

Public Member Functions

 WOnlyProjectFT (Int nFacets, Long cachesize, CountedPtr< CFCache > &cfcache, CountedPtr< ConvolutionFunction > &cf, CountedPtr< VisibilityResampler > &reSampler, Int tilesize=16, Float pbLimit=5e-2, Bool usezero=False)
 Constructor: cachesize is the size of the cache in words (e.g.
 WOnlyProjectFT (const RecordInterface &stateRec)
 Construct from a Record containing the WOnlyProjectFT state.
 WOnlyProjectFT (const WOnlyProjectFT &other)
 Copy constructor.
WOnlyProjectFToperator= (const WOnlyProjectFT &other)
 Assignment operator.
 ~WOnlyProjectFT ()
virtual void initializeToVis (ImageInterface< Complex > &image, const VisBuffer &vb)
 Initialize transform to Visibility plane.
virtual void initializeToVis (ImageInterface< Complex > &image, const VisBuffer &vb, Array< Complex > &griddedVis, Vector< Double > &uvscale)
 This version returns the gridded vis...should be used in conjunction with the version of 'get' that needs the gridded visdata.
virtual void finalizeToVis ()
 Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used.
virtual void initializeToSky (ImageInterface< Complex > &image, Matrix< Float > &weight, const VisBuffer &vb)
 Initialize transform to Sky plane: initializes the image.
virtual void finalizeToSky ()
 Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used.
virtual void initVisBuffer (VisBuffer &vb, Type whichVBColumn)
void initVisBuffer (VisBuffer &vb, Type whichVBColumn, Int row)
void get (VisBuffer &vb, Int row=-1)
 Get actual coherence from grid by degridding.
void get (VisBuffer &vb, Cube< Complex > &degrid, Array< Complex > &griddedVis, Vector< Double > &scale, Int row=-1)
 Get the coherence from grid return it in the degrid is used especially when scratch columns are not present in ms.
void put (const VisBuffer &, TempImage< Complex > &, Vector< Double > &, int, UVWMachine *, Bool)
 Put coherence to grid by gridding.
void put (const VisBuffer &vb, Int row=-1, Bool dopsf=False, FTMachine::Type type=FTMachine::OBSERVED)
 Put coherence to grid.
void makeImage (FTMachine::Type type, VisSet &vs, ImageInterface< Complex > &image, Matrix< Float > &weight)
 Make the entire image.
virtual ImageInterface< Complex > & getImage (Matrix< Float > &, Bool normalize=True)
 Get the final image: do the Fourier transform and grid-correct, then optionally normalize by the summed weights.
Bool toRecord (RecordInterface &outRec, Bool withImage=False)
 Save and restore the WOnlyProjectFT to and from a record.
Bool fromRecord (const RecordInterface &inRec)
Bool isFourier ()
 Can this FTMachine be represented by Fourier convolutions?
virtual void makeSensitivityImage (Lattice< Complex > &wtImage, ImageInterface< Float > &sensitivityImage, const Matrix< Float > &sumWt=Matrix< Float >(), const Bool &doFFTNorm=True)
 Make a sensitivity image (sensitivityImage), given the gridded weights (wtImage).
virtual void makeSensitivityImage (const VisBuffer &vb, const ImageInterface< Complex > &imageTemplate, ImageInterface< Float > &sensitivityImage)
virtual void normalizeImage (Lattice< Complex > &skyImage, const Matrix< Double > &sumOfWts, Lattice< Float > &sensitivityImage, Bool fftNorm=True)
 Given the sky image (Fourier transform of the visibilities), sum of weights and the sensitivity image, this method replaces the skyImage with the normalized image of the sky.
virtual void normalizeImage (Lattice< Complex > &skyImage, const Matrix< Double > &sumOfWts, Lattice< Float > &sensitivityImage, Lattice< Complex > &sensitivitySqImage, Bool fftNorm=True)
virtual ImageInterface< Float > & getSensitivityImage ()
virtual Matrix< Double > & getSumOfWeights ()
Vector< Int > & getPolMap ()
virtual String name ()
virtual Bool verifyShapes (IPosition shape0, IPosition shape1)
virtual void setMiscInfo (const Int qualifier)
 set the order of the Taylor term for MFS this is to tell A-Projection to qualify the accumulated avgPB for each Taylor term in the CFCache.

Protected Member Functions

Int nint (Double val)
void findConvFunction (const ImageInterface< Complex > &image, const VisBuffer &vb)
 Locate convolution functions on the disk Int locateConvFunction(const Int Nw, const Float pa); void cacheConvFunction(Int which, Array<Complex>& cf, CoordinateSystem& coord); Find the convolution function.
Array< Complex > * getDataPointer (const IPosition &, Bool)
 Get the appropriate data pointer.
void ok ()
void init ()
Bool recordOnGrid (const VisBuffer &vb, Int rownr) const
 virtual void initPolInfo(const VisBuffer& vb); Is this record on Grid? check both ends.
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, VisBuffer &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 VisBuffer &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)
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, VisBuffer &vb, Int &Nant_p, Int &scanNo, Double &sigma, Array< Float > &l_off, Array< Float > &m_off, Double area, Int &doGrad, Int paIndex)

Protected Attributes

Float padding_p
 Padding in FFT.
Int nWPlanes_p
LatticeCache< Complex > * imageCache
 Image cache.
Long cachesize
 Sizes.
Int tilesize
ConvolveGridder< Double,
Complex > * 
gridder
 Gridder.
Bool isTiled
 Is this tiled?
CountedPtr< Lattice< Complex > > arrayLattice
 Array lattice.
CountedPtr< Lattice< Complex > > lattice
 Lattice.
Float maxAbsData
IPosition centerLoc
 Useful IPositions.
IPosition offsetLoc
Vector< DoubleuvScale
 Image Scaling and offset.
Vector< DoubleuvOffset
Array< Complex > griddedData
 Array for non-tiled gridding.
MDirection::ConvertpointingToImage
 DirectionCoordinate directionCoord;.
Bool usezero_p
 Grid/degrid zero spacing points?
Array< Complex > convFunc_p
 CountedPtr<ConvolutionFunction> telescopeConvFunc_p; CFStore cfs_p, cfwts_p;.
Array< Complex > convWeights_p
CountedPtr< VisibilityResamplerreSampler_p
Int convSize
 Vector to hold the support size info.
Int convSampling
Int wConvSize
Int lastIndex_p
Int maxConvSupport
 No.
Int Nant_p
Bool makingPSF

Detailed Description

Definition at line 139 of file WOnlyProjectFT.h.


Constructor & Destructor Documentation

casa::WOnlyProjectFT::WOnlyProjectFT ( Int  nFacets,
Long  cachesize,
CountedPtr< CFCache > &  cfcache,
CountedPtr< ConvolutionFunction > &  cf,
CountedPtr< VisibilityResampler > &  reSampler,
Int  tilesize = 16,
Float  pbLimit = 5e-2,
Bool  usezero = 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).

Construct from a Record containing the WOnlyProjectFT state.

Copy constructor.


Member Function Documentation

virtual void casa::WOnlyProjectFT::finalizeToSky ( ) [virtual]

Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used.

DOES NOT DO THE FINAL TRANSFORM!

Implements casa::FTMachine.

virtual void casa::WOnlyProjectFT::finalizeToVis ( ) [virtual]

Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used.

Implements casa::FTMachine.

void casa::WOnlyProjectFT::findConvFunction ( const ImageInterface< Complex > &  image,
const VisBuffer vb 
) [protected, virtual]

Locate convolution functions on the disk Int locateConvFunction(const Int Nw, const Float pa); void cacheConvFunction(Int which, Array<Complex>& cf, CoordinateSystem& coord); Find the convolution function.

Reimplemented from casa::FTMachine.

void casa::WOnlyProjectFT::get ( VisBuffer vb,
Int  row = -1 
) [virtual]

Get actual coherence from grid by degridding.

Implements casa::FTMachine.

void casa::WOnlyProjectFT::get ( VisBuffer vb,
Cube< Complex > &  degrid,
Array< Complex > &  griddedVis,
Vector< Double > &  scale,
Int  row = -1 
)

Get the coherence from grid return it in the degrid is used especially when scratch columns are not present in ms.

Array<Complex>* casa::WOnlyProjectFT::getDataPointer ( const IPosition ,
Bool   
) [protected]

Get the appropriate data pointer.

virtual ImageInterface<Complex>& casa::WOnlyProjectFT::getImage ( Matrix< Float > &  ,
Bool  normalize = True 
) [virtual]

Get the final image: do the Fourier transform and grid-correct, then optionally normalize by the summed weights.

Implements casa::FTMachine.

Definition at line 263 of file WOnlyProjectFT.h.

References casa::FTMachine::polMap.

Definition at line 260 of file WOnlyProjectFT.h.

virtual Matrix<Double>& casa::WOnlyProjectFT::getSumOfWeights ( ) [inline, virtual]

Definition at line 261 of file WOnlyProjectFT.h.

References casa::FTMachine::sumWeight.

void casa::WOnlyProjectFT::init ( ) [protected]
virtual void casa::WOnlyProjectFT::initializeToSky ( ImageInterface< Complex > &  image,
Matrix< Float > &  weight,
const VisBuffer vb 
) [virtual]

Initialize transform to Sky plane: initializes the image.

Implements casa::FTMachine.

virtual void casa::WOnlyProjectFT::initializeToVis ( ImageInterface< Complex > &  image,
const VisBuffer vb 
) [virtual]

Initialize transform to Visibility plane.

Implements casa::FTMachine.

virtual void casa::WOnlyProjectFT::initializeToVis ( ImageInterface< Complex > &  image,
const VisBuffer vb,
Array< Complex > &  griddedVis,
Vector< Double > &  uvscale 
) [virtual]

This version returns the gridded vis...should be used in conjunction with the version of 'get' that needs the gridded visdata.

virtual void casa::WOnlyProjectFT::initVisBuffer ( VisBuffer vb,
Type  whichVBColumn 
) [virtual]
void casa::WOnlyProjectFT::initVisBuffer ( VisBuffer vb,
Type  whichVBColumn,
Int  row 
)
Bool casa::WOnlyProjectFT::isFourier ( ) [inline, virtual]

Can this FTMachine be represented by Fourier convolutions?

Reimplemented from casa::FTMachine.

Definition at line 227 of file WOnlyProjectFT.h.

References casa::True.

void casa::WOnlyProjectFT::makeImage ( FTMachine::Type  type,
VisSet vs,
ImageInterface< Complex > &  image,
Matrix< Float > &  weight 
) [virtual]

Make the entire image.

Reimplemented from casa::FTMachine.

virtual void casa::WOnlyProjectFT::makeSensitivityImage ( Lattice< Complex > &  wtImage,
ImageInterface< Float > &  sensitivityImage,
const Matrix< Float > &  sumWt = Matrix<Float>(),
const Bool doFFTNorm = True 
) [inline, virtual]

Make a sensitivity image (sensitivityImage), given the gridded weights (wtImage).

These are related to each other by a Fourier transform and normalization by the sum-of-weights (sumWt) and normalization by the product of the 2D FFT size along each axis. If doFFTNorm=False, normalization by the FFT size is not done. If sumWt is not provided, normalization by the sum of weights is also not done.

Definition at line 238 of file WOnlyProjectFT.h.

virtual void casa::WOnlyProjectFT::makeSensitivityImage ( const VisBuffer vb,
const ImageInterface< Complex > &  imageTemplate,
ImageInterface< Float > &  sensitivityImage 
) [virtual]
virtual String casa::WOnlyProjectFT::name ( ) [inline, virtual]

Definition at line 264 of file WOnlyProjectFT.h.

Int casa::WOnlyProjectFT::nint ( Double  val) [inline, protected]

Definition at line 270 of file WOnlyProjectFT.h.

References casa::floor().

virtual void casa::WOnlyProjectFT::normalizeImage ( Lattice< Complex > &  skyImage,
const Matrix< Double > &  sumOfWts,
Lattice< Float > &  sensitivityImage,
Bool  fftNorm = True 
) [virtual]

Given the sky image (Fourier transform of the visibilities), sum of weights and the sensitivity image, this method replaces the skyImage with the normalized image of the sky.

Reimplemented from casa::FTMachine.

virtual void casa::WOnlyProjectFT::normalizeImage ( Lattice< Complex > &  skyImage,
const Matrix< Double > &  sumOfWts,
Lattice< Float > &  sensitivityImage,
Lattice< Complex > &  sensitivitySqImage,
Bool  fftNorm = True 
) [virtual]
void casa::WOnlyProjectFT::ok ( ) [protected, virtual]

Reimplemented from casa::FTMachine.

WOnlyProjectFT& casa::WOnlyProjectFT::operator= ( const WOnlyProjectFT other)

Assignment operator.

void casa::WOnlyProjectFT::put ( const VisBuffer ,
TempImage< Complex > &  ,
Vector< Double > &  ,
int  ,
UVWMachine ,
Bool   
) [inline]

Put coherence to grid by gridding.

throw(AipsError("WOnlyProjectFT::put is not implemented"));

Definition at line 204 of file WOnlyProjectFT.h.

void casa::WOnlyProjectFT::put ( const VisBuffer vb,
Int  row = -1,
Bool  dopsf = False,
FTMachine::Type  type = FTMachine::OBSERVED 
) [virtual]

Put coherence to grid.

Implements casa::FTMachine.

Bool casa::WOnlyProjectFT::recordOnGrid ( const VisBuffer vb,
Int  rownr 
) const [protected]

virtual void initPolInfo(const VisBuffer& vb); Is this record on Grid? check both ends.

This assumes that the ends bracket the middle

virtual void casa::WOnlyProjectFT::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,
VisBuffer vb,
Int Nant_p,
Int scanNo,
Double sigma,
Array< Float > &  raoffsets,
Array< Float > &  decoffsets,
Double  area,
Int doGrad,
Int  paIndex 
) [protected, virtual]
Parameters:
ConjCube<Complex>& gradVisAzData, Cube<Complex>& gradVisElData, IPosition& gradS,
void casa::WOnlyProjectFT::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,
VisBuffer vb,
Int Nant_p,
Int scanNo,
Double sigma,
Array< Float > &  l_off,
Array< Float > &  m_off,
Double  area,
Int doGrad,
Int  paIndex 
) [protected]
Parameters:
ConjIPosition& gradS,
virtual void casa::WOnlyProjectFT::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 VisBuffer 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 
) [protected, virtual]
Parameters:
ConjCube<Complex>& gradVisAzData, Cube<Complex>& gradVisElData, IPosition& gradS,
virtual void casa::WOnlyProjectFT::setMiscInfo ( const Int  qualifier) [inline, virtual]

set the order of the Taylor term for MFS this is to tell A-Projection to qualify the accumulated avgPB for each Taylor term in the CFCache.

Implements casa::FTMachine.

Definition at line 266 of file WOnlyProjectFT.h.

Save and restore the WOnlyProjectFT to and from a record.

virtual Bool casa::WOnlyProjectFT::verifyShapes ( IPosition  shape0,
IPosition  shape1 
) [virtual]

Member Data Documentation

Array lattice.

Definition at line 307 of file WOnlyProjectFT.h.

Sizes.

Definition at line 297 of file WOnlyProjectFT.h.

Useful IPositions.

Definition at line 316 of file WOnlyProjectFT.h.

CountedPtr<ConvolutionFunction> telescopeConvFunc_p; CFStore cfs_p, cfwts_p;.

Definition at line 332 of file WOnlyProjectFT.h.

Definition at line 339 of file WOnlyProjectFT.h.

Vector to hold the support size info.

for the convolution functions pointed to by the elements of convFunctions_p. The co-ordinates of this array are (W-term, Poln, PA).

Definition at line 339 of file WOnlyProjectFT.h.

Definition at line 332 of file WOnlyProjectFT.h.

Array for non-tiled gridding.

Definition at line 322 of file WOnlyProjectFT.h.

Gridder.

Definition at line 301 of file WOnlyProjectFT.h.

Image cache.

Definition at line 294 of file WOnlyProjectFT.h.

Is this tiled?

Definition at line 304 of file WOnlyProjectFT.h.

Definition at line 339 of file WOnlyProjectFT.h.

Lattice.

For non-tiled gridding, this will point to arrayLattice, whereas for tiled gridding, this points to the image

Definition at line 311 of file WOnlyProjectFT.h.

Definition at line 348 of file WOnlyProjectFT.h.

Definition at line 313 of file WOnlyProjectFT.h.

No.

of vis. polarization planes used in making the user defined Stokes images

Definition at line 345 of file WOnlyProjectFT.h.

Definition at line 347 of file WOnlyProjectFT.h.

Definition at line 292 of file WOnlyProjectFT.h.

Definition at line 316 of file WOnlyProjectFT.h.

Padding in FFT.

Definition at line 290 of file WOnlyProjectFT.h.

DirectionCoordinate directionCoord;.

Definition at line 325 of file WOnlyProjectFT.h.

Definition at line 333 of file WOnlyProjectFT.h.

Definition at line 298 of file WOnlyProjectFT.h.

Grid/degrid zero spacing points?

Definition at line 328 of file WOnlyProjectFT.h.

Definition at line 319 of file WOnlyProjectFT.h.

Image Scaling and offset.

Definition at line 319 of file WOnlyProjectFT.h.

Definition at line 339 of file WOnlyProjectFT.h.


The documentation for this class was generated from the following file: