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

#include <NewMultiTermFT.h>

Inheritance diagram for casa::NewMultiTermFT:
casa::FTMachine

List of all members.

Public Member Functions

 NewMultiTermFT (FTMachine *subftm, Int nterms=1, Double reffreq=0.0)
 Construct using an existing FT-Machine.
 NewMultiTermFT (const RecordInterface &stateRec)
 Construct from a Record containing the NewMultiTermFT state.
 NewMultiTermFT (const NewMultiTermFT &other)
 Copy constructor.
NewMultiTermFToperator= (const NewMultiTermFT &other)
 Assignment operator --- leave it as the default.
 ~NewMultiTermFT ()
 Destructor.
void initializeToVis (ImageInterface< Complex > &, const VisBuffer &)
 Called at the start of de-gridding : subftm->initializeToVis() Note : Pre-de-gridding model-image divisions by PBs will go here.
void initializeToVis (Block< CountedPtr< ImageInterface< Complex > > > &compImageVec, PtrBlock< SubImage< Float > * > &modelImageVec, PtrBlock< SubImage< Float > * > &weightImageVec, PtrBlock< SubImage< Float > * > &fluxScaleVec, Block< Matrix< Float > > &weightsVec, const VisBuffer &vb)
 Vectorized InitializeToVis.
void finalizeToVis ()
 Called at the end of de-gridding : subftm->finalizeToVis()
void initializeToSky (ImageInterface< Complex > &, Matrix< Float > &, const VisBuffer &)
 Called at the start of gridding : subftm->initializeToSky()
void initializeToSky (Block< CountedPtr< ImageInterface< Complex > > > &compImageVec, Block< Matrix< Float > > &weightsVec, const VisBuffer &vb, const Bool dopsf)
 Vectorized InitializeToSky.
void finalizeToSky ()
 Called at the end of gridding : subftm->finalizeToSky()
void finalizeToSky (Block< CountedPtr< ImageInterface< Complex > > > &compImageVec, PtrBlock< SubImage< Float > * > &resImageVec, PtrBlock< SubImage< Float > * > &weightImageVec, PtrBlock< SubImage< Float > * > &fluxScaleVec, Bool dopsf, Block< Matrix< Float > > &weightsVec)
 Vectorized finalizeToSky.
void get (VisBuffer &vb, Int row=-1)
 void normalizeToSky(ImageInterface<Complex>& compImage, ImageInterface<Float>& resImage, ImageInterface<Float>& weightImage, Bool dopsf, Matrix<Float>& weights) {throw(AipsError("NewMultiTermFT::normalizeToSky should not get called !"));};
void put (VisBuffer &vb, Int row=-1, Bool dopsf=False, FTMachine::Type type=FTMachine::OBSERVED)
 Modify imaging weights with Taylor-weights and do gridding via subftm->put()
void put (const VisBuffer &, Int=-1, Bool=False, FTMachine::Type=FTMachine::OBSERVED)
 Have a const version for compatibility with other FTMs.
virtual void ComputeResiduals (VisBuffer &vb, Bool useCorrected)
 Calculate residual visibilities if possible.
void makeImage (FTMachine::Type type, VisSet &vs, ImageInterface< Complex > &image, Matrix< Float > &weight)
 Make an image : subftm->makeImage()
ImageInterface< Complex > & getImage (Matrix< Float > &, Bool=True)
 Get the final image: do the Fourier transform grid-correct, then optionally normalize by the summed weights Note : Post-gridding residual-image divisions by PBs will go here.
void getWeightImage (ImageInterface< Float > &weightImage, Matrix< Float > &weights)
 Place-holder for possible use with AWProject and AWProjectWB FTMs.
virtual Bool toRecord (String &error, RecordInterface &outRec, Bool withImage=False)
 {throw(AipsError("NewMultiTermFT::getWeightImage() should not be called"));}
virtual Bool fromRecord (String &error, const RecordInterface &inRec)
virtual Bool isFourier ()
 Various small inline functions.
virtual void setNoPadding (Bool nopad)
 To make sure no padding is used in certain gridders.
virtual String name () const
 Return the name of the machine.
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.
void printFTTypes ()
virtual void setDOPBCorrection (Bool doit=True)
virtual Bool getDOPBCorrection ()
virtual void setConjBeams (Bool useit=True)
virtual Bool getConjBeams ()

Protected Member Functions

FTMachinegetNewFTM (const FTMachine *ftm)
 Instantiate a new sub FTM.
Bool modifyVisWeights (VisBuffer &vb, uInt thisterm)
 Multiply Imaging weights by Taylor-function weights - during "put".
Bool modifyModelVis (VisBuffer &vb, uInt thisterm)
 Multiply model visibilities by Taylor-function weights - during "get".
void restoreImagingWeights (VisBuffer &vb)
 Restore vb.imagingweights to the original.
void normAvgPBs (PtrBlock< SubImage< Float > * > &weightImageVec)
 Use sumwts to make a Hessian, invert it, apply to weight images, fill in pbcoeffs_p.
void calculateTaylorPBs (PtrBlock< SubImage< Float > * > &weightImageVec)
void applyWideBandPB (String action, PtrBlock< SubImage< Float > * > &imageVec)
 Make pixel-by-pixel matrices from pbcoeffs, invert, apply to residuals void normalizeWideBandPB2(PtrBlock<SubImage<Float> *> & resImageVec); void normalizeWideBandPB(PtrBlock<SubImage<Float> *> & resImageVec, PtrBlock<SubImage<Float> *>& scratchImageVec);.
void multiplyHMatrix (Matrix< Double > &hmat, PtrBlock< SubImage< Float > * > &invec, PtrBlock< SubImage< Float > * > &outvec, String saveImagePrefix)
Bool storeAsImg (String fileName, ImageInterface< Float > &theImg)
 Helper function to write ImageInterfaces to disk.

Protected Attributes

Cube< Complex > modviscube_p
New MTFT specific internal
parameters and functions *uInt 
nterms_p
Bool donePSF_p
Bool doingPSF_p
Double reffreq_p
Matrix< Floatimweights_p
String machineName_p
Float pblimit_p
Bool doWideBandPBCorrection_p
String cacheDir_p
Bool donePBTaylor_p
Bool useConjBeams_p
Block< CountedPtr< FTMachine > > subftms_p
Block< Matrix< Float > > sumweights_p
Double sumwt_p
Matrix< Doublehess_p
Matrix< Doubleinvhess_p
Block< CountedPtr
< ImageInterface< Float > > > 
sensitivitymaps_p
PtrBlock< SubImage< Float > * > pbcoeffs_p
Bool dbg_p
Bool dotime_p
Timer tmr_p
Double time_get
Double time_put
Double time_res

Detailed Description

Definition at line 52 of file NewMultiTermFT.h.


Constructor & Destructor Documentation

casa::NewMultiTermFT::NewMultiTermFT ( FTMachine subftm,
Int  nterms = 1,
Double  reffreq = 0.0 
)

Construct using an existing FT-Machine.

Construct from a Record containing the NewMultiTermFT state.

Copy constructor.

This first calls the default "=" operator, and then instantiates objects for member pointers.

Destructor.


Member Function Documentation

void casa::NewMultiTermFT::applyWideBandPB ( String  action,
PtrBlock< SubImage< Float > * > &  imageVec 
) [protected]

Make pixel-by-pixel matrices from pbcoeffs, invert, apply to residuals void normalizeWideBandPB2(PtrBlock<SubImage<Float> *> & resImageVec); void normalizeWideBandPB(PtrBlock<SubImage<Float> *> & resImageVec, PtrBlock<SubImage<Float> *>& scratchImageVec);.

void casa::NewMultiTermFT::calculateTaylorPBs ( PtrBlock< SubImage< Float > * > &  weightImageVec) [protected]
virtual void casa::NewMultiTermFT::ComputeResiduals ( VisBuffer vb,
Bool  useCorrected 
) [virtual]

Calculate residual visibilities if possible.

The purpose is to allow rGridFT to make this multi-threaded

Implements casa::FTMachine.

void casa::NewMultiTermFT::finalizeToSky ( ) [inline, virtual]

Called at the end of gridding : subftm->finalizeToSky()

Implements casa::FTMachine.

Definition at line 92 of file NewMultiTermFT.h.

void casa::NewMultiTermFT::finalizeToSky ( Block< CountedPtr< ImageInterface< Complex > > > &  compImageVec,
PtrBlock< SubImage< Float > * > &  resImageVec,
PtrBlock< SubImage< Float > * > &  weightImageVec,
PtrBlock< SubImage< Float > * > &  fluxScaleVec,
Bool  dopsf,
Block< Matrix< Float > > &  weightsVec 
) [virtual]

Vectorized finalizeToSky.

Reimplemented from casa::FTMachine.

Called at the end of de-gridding : subftm->finalizeToVis()

Implements casa::FTMachine.

virtual Bool casa::NewMultiTermFT::fromRecord ( String error,
const RecordInterface inRec 
) [virtual]

Reimplemented from casa::FTMachine.

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

void normalizeToSky(ImageInterface<Complex>& compImage, ImageInterface<Float>& resImage, ImageInterface<Float>& weightImage, Bool dopsf, Matrix<Float>& weights) {throw(AipsError("NewMultiTermFT::normalizeToSky should not get called !"));};

Do the degridding via subftm->get() and modify model-visibilities by Taylor-weights

Implements casa::FTMachine.

virtual Bool casa::NewMultiTermFT::getConjBeams ( ) [inline, virtual]

Definition at line 172 of file NewMultiTermFT.h.

References useConjBeams_p.

virtual Bool casa::NewMultiTermFT::getDOPBCorrection ( ) [inline, virtual]

Definition at line 170 of file NewMultiTermFT.h.

References doWideBandPBCorrection_p.

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

Get the final image: do the Fourier transform grid-correct, then optionally normalize by the summed weights Note : Post-gridding residual-image divisions by PBs will go here.

       For now, it just calls subftm->getImage()

ImageInterface<Complex>& getImage(Matrix<Float>& weights, Bool normalize=True) {return getImage(weights,normalize,0);}; ImageInterface<Complex>& getImage(Matrix<Float>& weights, Bool normalize=True, const Int taylorindex=0);

Implements casa::FTMachine.

Definition at line 130 of file NewMultiTermFT.h.

FTMachine* casa::NewMultiTermFT::getNewFTM ( const FTMachine ftm) [protected]

Instantiate a new sub FTM.

void casa::NewMultiTermFT::getWeightImage ( ImageInterface< Float > &  weightImage,
Matrix< Float > &  weights 
) [inline, virtual]

Place-holder for possible use with AWProject and AWProjectWB FTMs.

Get the final weights image - this will hold PB2 void getWeightImage(ImageInterface<Float>& weightImage, Matrix<Float>& weights) {getWeightImage(weightImage, weights, 0);}; void getWeightImage(ImageInterface<Float>& weightImage, Matrix<Float>& weights, const Int taylorindex);

Implements casa::FTMachine.

Definition at line 147 of file NewMultiTermFT.h.

References subftms_p.

void casa::NewMultiTermFT::initializeToSky ( ImageInterface< Complex > &  ,
Matrix< Float > &  ,
const VisBuffer  
) [inline, virtual]

Called at the start of gridding : subftm->initializeToSky()

Implements casa::FTMachine.

Definition at line 84 of file NewMultiTermFT.h.

void casa::NewMultiTermFT::initializeToSky ( Block< CountedPtr< ImageInterface< Complex > > > &  compImageVec,
Block< Matrix< Float > > &  weightsVec,
const VisBuffer vb,
const Bool  dopsf 
) [virtual]

Vectorized InitializeToSky.

Reimplemented from casa::FTMachine.

void casa::NewMultiTermFT::initializeToVis ( ImageInterface< Complex > &  ,
const VisBuffer  
) [inline, virtual]

Called at the start of de-gridding : subftm->initializeToVis() Note : Pre-de-gridding model-image divisions by PBs will go here.

Implements casa::FTMachine.

Definition at line 73 of file NewMultiTermFT.h.

void casa::NewMultiTermFT::initializeToVis ( Block< CountedPtr< ImageInterface< Complex > > > &  compImageVec,
PtrBlock< SubImage< Float > * > &  modelImageVec,
PtrBlock< SubImage< Float > * > &  weightImageVec,
PtrBlock< SubImage< Float > * > &  fluxScaleVec,
Block< Matrix< Float > > &  weightsVec,
const VisBuffer vb 
) [virtual]

Vectorized InitializeToVis.

Reimplemented from casa::FTMachine.

virtual Bool casa::NewMultiTermFT::isFourier ( ) [inline, virtual]

Various small inline functions.

Reimplemented from casa::FTMachine.

Definition at line 156 of file NewMultiTermFT.h.

References casa::True.

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

Make an image : subftm->makeImage()

Reimplemented from casa::FTMachine.

Bool casa::NewMultiTermFT::modifyModelVis ( VisBuffer vb,
uInt  thisterm 
) [protected]

Multiply model visibilities by Taylor-function weights - during "get".

Bool casa::NewMultiTermFT::modifyVisWeights ( VisBuffer vb,
uInt  thisterm 
) [protected]

Multiply Imaging weights by Taylor-function weights - during "put".

void casa::NewMultiTermFT::multiplyHMatrix ( Matrix< Double > &  hmat,
PtrBlock< SubImage< Float > * > &  invec,
PtrBlock< SubImage< Float > * > &  outvec,
String  saveImagePrefix 
) [protected]
virtual String casa::NewMultiTermFT::name ( ) const [inline, virtual]

Return the name of the machine.

Implements casa::FTMachine.

Definition at line 158 of file NewMultiTermFT.h.

References machineName_p.

void casa::NewMultiTermFT::normAvgPBs ( PtrBlock< SubImage< Float > * > &  weightImageVec) [protected]

Use sumwts to make a Hessian, invert it, apply to weight images, fill in pbcoeffs_p.

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

Assignment operator --- leave it as the default.

Definition at line 161 of file NewMultiTermFT.h.

References casa::nelements(), casa::Block< T >::nelements(), and subftms_p.

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

Modify imaging weights with Taylor-weights and do gridding via subftm->put()

Reimplemented from casa::FTMachine.

void casa::NewMultiTermFT::put ( const VisBuffer ,
Int  = -1,
Bool  = False,
FTMachine::Type  = FTMachine::OBSERVED 
) [inline, virtual]

Have a const version for compatibility with other FTMs.

. Throw an exception if called.

Implements casa::FTMachine.

Definition at line 108 of file NewMultiTermFT.h.

Restore vb.imagingweights to the original.

virtual void casa::NewMultiTermFT::setConjBeams ( Bool  useit = True) [inline, virtual]

Definition at line 171 of file NewMultiTermFT.h.

References useConjBeams_p.

virtual void casa::NewMultiTermFT::setDOPBCorrection ( Bool  doit = True) [inline, virtual]

Definition at line 169 of file NewMultiTermFT.h.

References doWideBandPBCorrection_p.

virtual void casa::NewMultiTermFT::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 159 of file NewMultiTermFT.h.

virtual void casa::NewMultiTermFT::setNoPadding ( Bool  nopad) [inline, virtual]

To make sure no padding is used in certain gridders.

Reimplemented from casa::FTMachine.

Definition at line 157 of file NewMultiTermFT.h.

References subftms_p.

Bool casa::NewMultiTermFT::storeAsImg ( String  fileName,
ImageInterface< Float > &  theImg 
) [protected]

Helper function to write ImageInterfaces to disk.

virtual Bool casa::NewMultiTermFT::toRecord ( String error,
RecordInterface outRec,
Bool  withImage = False 
) [virtual]

{throw(AipsError("NewMultiTermFT::getWeightImage() should not be called"));}

Save and restore the NewMultiTermFT to and from a record

Reimplemented from casa::FTMachine.


Member Data Documentation

Definition at line 212 of file NewMultiTermFT.h.

Definition at line 225 of file NewMultiTermFT.h.

Definition at line 206 of file NewMultiTermFT.h.

Definition at line 213 of file NewMultiTermFT.h.

Definition at line 206 of file NewMultiTermFT.h.

Definition at line 225 of file NewMultiTermFT.h.

Definition at line 211 of file NewMultiTermFT.h.

Referenced by getDOPBCorrection(), and setDOPBCorrection().

Definition at line 220 of file NewMultiTermFT.h.

Definition at line 208 of file NewMultiTermFT.h.

Definition at line 220 of file NewMultiTermFT.h.

Definition at line 209 of file NewMultiTermFT.h.

Referenced by name().

Definition at line 202 of file NewMultiTermFT.h.

New MTFT specific internal parameters and functions* uInt casa::NewMultiTermFT::nterms_p [protected]

Definition at line 205 of file NewMultiTermFT.h.

Definition at line 223 of file NewMultiTermFT.h.

Definition at line 210 of file NewMultiTermFT.h.

Definition at line 207 of file NewMultiTermFT.h.

Definition at line 222 of file NewMultiTermFT.h.

Definition at line 216 of file NewMultiTermFT.h.

Referenced by getWeightImage(), printFTTypes(), and setNoPadding().

Definition at line 217 of file NewMultiTermFT.h.

Definition at line 219 of file NewMultiTermFT.h.

Definition at line 227 of file NewMultiTermFT.h.

Definition at line 227 of file NewMultiTermFT.h.

Definition at line 227 of file NewMultiTermFT.h.

Definition at line 226 of file NewMultiTermFT.h.

Definition at line 214 of file NewMultiTermFT.h.

Referenced by getConjBeams(), and setConjBeams().


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