casa
$Rev:20696$
|
#include <MosaicFT.h>
Public Member Functions | |
MosaicFT (SkyJones *sj, MPosition mloc, String stokes, Long cachesize, Int tilesize=16, Bool usezero=True, Bool useDoublePrec=False) | |
Constructor: cachesize is the size of the cache in words (e.g. | |
MosaicFT (const RecordInterface &stateRec) | |
Construct from a Record containing the MosaicFT state. | |
MosaicFT (const MosaicFT &other) | |
Copy constructor. | |
MosaicFT & | operator= (const MosaicFT &other) |
Assignment operator. | |
~MosaicFT () | |
void | initializeToVis (ImageInterface< Complex > &image, const VisBuffer &vb) |
Initialize transform to Visibility plane using the image as a template. | |
void | finalizeToVis () |
Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used. | |
void | initializeToSky (ImageInterface< Complex > &image, Matrix< Float > &weight, const VisBuffer &vb) |
Initialize transform to Sky plane: initializes the image. | |
void | finalizeToSky () |
Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used. | |
void | get (VisBuffer &vb, Int row=-1) |
Get actual coherence from grid by degridding. | |
void | put (const VisBuffer &vb, Int row=-1, Bool dopsf=False, FTMachine::Type type=FTMachine::OBSERVED) |
Put coherence to grid by gridding. | |
void | makeImage (FTMachine::Type type, VisSet &vs, ImageInterface< Complex > &image, Matrix< Float > &weight) |
Make the entire image. | |
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. | |
virtual void | normalizeImage (Lattice< Complex > &, const Matrix< Double > &, Lattice< Float > &, Bool) |
void | getWeightImage (ImageInterface< Float > &, Matrix< Float > &) |
Get the final weights image. | |
virtual void | getFluxImage (ImageInterface< Float > &image) |
Get a flux (divide by this to get a flux density correct image) image if there is one. | |
Bool | toRecord (String &error, RecordInterface &outRec, Bool withImage=False) |
Save and restore the MosaicFT to and from a record. | |
Bool | fromRecord (String &error, const RecordInterface &inRec) |
Bool | isFourier () |
Can this FTMachine be represented by Fourier convolutions? | |
virtual String | name () const |
Return name of this machine. | |
void | setConvFunc (CountedPtr< SimplePBConvFunc > &pbconvFunc) |
Copy convolution function etc to another FT machine necessary if ft and ift are distinct but can share convfunctions. | |
CountedPtr< SimplePBConvFunc > & | getConvFunc () |
CountedPtr< TempImage< Float > > & | getConvWeightImage () |
virtual void | reset () |
reset weight image | |
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. | |
virtual void | ComputeResiduals (VisBuffer &, Bool) |
Make the VB and VBStore interefaces for the interim re-factoring work. | |
Protected Member Functions | |
Int | nint (Double val) |
void | findConvFunction (const ImageInterface< Complex > &image, const VisBuffer &vb) |
Find the convolution function. | |
void | addBeamCoverage (ImageInterface< Complex > &image) |
void | prepGridForDegrid () |
Array< Complex > * | getDataPointer (const IPosition &, Bool) |
Get the appropriate data pointer. | |
void | ok () |
void | init () |
Bool | recordOnGrid (const VisBuffer &vb, Int rownr) const |
Is this record on Grid? check both ends. | |
Int | getIndex (const ROMSPointingColumns &mspc, const Double &time, const Double &interval) |
Bool | getXYPos (const VisBuffer &vb, Int row) |
Protected Attributes | |
SkyJones * | sj_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. | |
CountedPtr< Lattice< Complex > > | weightLattice |
Float | maxAbsData |
IPosition | centerLoc |
Useful IPositions. | |
IPosition | offsetLoc |
Vector< Double > | uvScale |
Image Scaling and offset. | |
Vector< Double > | uvOffset |
Array< Complex > | griddedData |
Array for non-tiled gridding. | |
Array< Complex > | griddedWeight |
Array< DComplex > | griddedData2 |
Array< DComplex > | griddedWeight2 |
MSPointingColumns * | mspc |
Pointing columns. | |
MSAntennaColumns * | msac |
Antenna columns. | |
DirectionCoordinate | directionCoord |
MDirection::Convert * | pointingToImage |
Vector< Double > | xyPos |
MDirection | worldPosMeas |
Int | priorCacheSize |
Bool | usezero_p |
Grid/degrid zero spacing points? | |
Cube< Complex > | convFunc |
Cube< Complex > | weightConvFunc_p |
Int | convSampling |
Int | convSize |
Int | convSupport |
Vector< Int > | convSupportPlanes_p |
Vector< Int > | convSizePlanes_p |
Vector< Int > | convRowMap_p |
Int | wConvSize |
Int | lastIndex_p |
CountedPtr< TempImage< Float > > | skyCoverage_p |
TempImage< Complex > * | convWeightImage_p |
CountedPtr< SimplePBConvFunc > | pbConvFunc_p |
String | machineName_p |
Later this. | |
Bool | doneWeightImage_p |
String | stokes_p |
Definition at line 130 of file MosaicFT.h.
casa::MosaicFT::MosaicFT | ( | SkyJones * | sj, |
MPosition | mloc, | ||
String | stokes, | ||
Long | cachesize, | ||
Int | tilesize = 16 , |
||
Bool | usezero = True , |
||
Bool | useDoublePrec = 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::MosaicFT::MosaicFT | ( | const RecordInterface & | stateRec | ) |
casa::MosaicFT::MosaicFT | ( | const MosaicFT & | other | ) |
Copy constructor.
void casa::MosaicFT::addBeamCoverage | ( | ImageInterface< Complex > & | image | ) | [protected] |
virtual void casa::MosaicFT::ComputeResiduals | ( | VisBuffer & | vb, |
Bool | useCorrected | ||
) | [inline, virtual] |
Make the VB and VBStore interefaces for the interim re-factoring work.
Finally removed the VB interface.
Implements casa::FTMachine.
Definition at line 226 of file MosaicFT.h.
void casa::MosaicFT::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.
void casa::MosaicFT::finalizeToVis | ( | ) | [virtual] |
Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used.
Implements casa::FTMachine.
void casa::MosaicFT::findConvFunction | ( | const ImageInterface< Complex > & | image, |
const VisBuffer & | vb | ||
) | [protected, virtual] |
Find the convolution function.
Reimplemented from casa::FTMachine.
Bool casa::MosaicFT::fromRecord | ( | String & | error, |
const RecordInterface & | inRec | ||
) | [virtual] |
Reimplemented from casa::FTMachine.
void casa::MosaicFT::get | ( | VisBuffer & | vb, |
Int | row = -1 |
||
) | [virtual] |
Get actual coherence from grid by degridding.
Implements casa::FTMachine.
Array<Complex>* casa::MosaicFT::getDataPointer | ( | const IPosition & | , |
Bool | |||
) | [protected] |
Get the appropriate data pointer.
virtual void casa::MosaicFT::getFluxImage | ( | ImageInterface< Float > & | image | ) | [virtual] |
Get a flux (divide by this to get a flux density correct image) image if there is one.
Reimplemented from casa::FTMachine.
ImageInterface<Complex>& casa::MosaicFT::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.
Int casa::MosaicFT::getIndex | ( | const ROMSPointingColumns & | mspc, |
const Double & | time, | ||
const Double & | interval | ||
) | [protected] |
void casa::MosaicFT::getWeightImage | ( | ImageInterface< Float > & | , |
Matrix< Float > & | |||
) | [virtual] |
Get the final weights image.
Implements casa::FTMachine.
Bool casa::MosaicFT::getXYPos | ( | const VisBuffer & | vb, |
Int | row | ||
) | [protected] |
void casa::MosaicFT::init | ( | ) | [protected] |
void casa::MosaicFT::initializeToSky | ( | ImageInterface< Complex > & | image, |
Matrix< Float > & | weight, | ||
const VisBuffer & | vb | ||
) | [virtual] |
Initialize transform to Sky plane: initializes the image.
Implements casa::FTMachine.
void casa::MosaicFT::initializeToVis | ( | ImageInterface< Complex > & | image, |
const VisBuffer & | vb | ||
) | [virtual] |
Initialize transform to Visibility plane using the image as a template.
The image is loaded and Fourier transformed.
Implements casa::FTMachine.
Bool casa::MosaicFT::isFourier | ( | ) | [inline, virtual] |
Can this FTMachine be represented by Fourier convolutions?
Reimplemented from casa::FTMachine.
Definition at line 209 of file MosaicFT.h.
References casa::True.
void casa::MosaicFT::makeImage | ( | FTMachine::Type | type, |
VisSet & | vs, | ||
ImageInterface< Complex > & | image, | ||
Matrix< Float > & | weight | ||
) | [virtual] |
Make the entire image.
Reimplemented from casa::FTMachine.
virtual String casa::MosaicFT::name | ( | ) | const [virtual] |
Return name of this machine.
Implements casa::FTMachine.
Int casa::MosaicFT::nint | ( | Double | val | ) | [inline, protected] |
Definition at line 230 of file MosaicFT.h.
References casa::floor().
virtual void casa::MosaicFT::normalizeImage | ( | Lattice< Complex > & | , |
const Matrix< Double > & | , | ||
Lattice< Float > & | , | ||
Bool | |||
) | [inline, virtual] |
Reimplemented from casa::FTMachine.
Definition at line 189 of file MosaicFT.h.
void casa::MosaicFT::ok | ( | ) | [protected, virtual] |
Reimplemented from casa::FTMachine.
void casa::MosaicFT::prepGridForDegrid | ( | ) | [protected] |
void casa::MosaicFT::put | ( | const VisBuffer & | vb, |
Int | row = -1 , |
||
Bool | dopsf = False , |
||
FTMachine::Type | type = FTMachine::OBSERVED |
||
) | [virtual] |
Put coherence to grid by gridding.
Implements casa::FTMachine.
Bool casa::MosaicFT::recordOnGrid | ( | const VisBuffer & | vb, |
Int | rownr | ||
) | const [protected] |
Is this record on Grid? check both ends.
This assumes that the ends bracket the middle
virtual void casa::MosaicFT::reset | ( | ) | [virtual] |
reset weight image
Reimplemented from casa::FTMachine.
void casa::MosaicFT::setConvFunc | ( | CountedPtr< SimplePBConvFunc > & | pbconvFunc | ) |
Copy convolution function etc to another FT machine necessary if ft and ift are distinct but can share convfunctions.
virtual void casa::MosaicFT::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 225 of file MosaicFT.h.
Bool casa::MosaicFT::toRecord | ( | String & | error, |
RecordInterface & | outRec, | ||
Bool | withImage = False |
||
) | [virtual] |
Save and restore the MosaicFT to and from a record.
Reimplemented from casa::FTMachine.
CountedPtr<Lattice<Complex> > casa::MosaicFT::arrayLattice [protected] |
Array lattice.
Definition at line 268 of file MosaicFT.h.
Long casa::MosaicFT::cachesize [protected] |
Sizes.
Definition at line 258 of file MosaicFT.h.
IPosition casa::MosaicFT::centerLoc [protected] |
Useful IPositions.
Definition at line 278 of file MosaicFT.h.
Cube<Complex> casa::MosaicFT::convFunc [protected] |
Definition at line 307 of file MosaicFT.h.
Vector<Int> casa::MosaicFT::convRowMap_p [protected] |
Definition at line 314 of file MosaicFT.h.
Int casa::MosaicFT::convSampling [protected] |
Definition at line 309 of file MosaicFT.h.
Int casa::MosaicFT::convSize [protected] |
Definition at line 310 of file MosaicFT.h.
Vector<Int> casa::MosaicFT::convSizePlanes_p [protected] |
Definition at line 313 of file MosaicFT.h.
Int casa::MosaicFT::convSupport [protected] |
Definition at line 311 of file MosaicFT.h.
Vector<Int> casa::MosaicFT::convSupportPlanes_p [protected] |
Definition at line 312 of file MosaicFT.h.
TempImage<Complex>* casa::MosaicFT::convWeightImage_p [protected] |
Definition at line 326 of file MosaicFT.h.
DirectionCoordinate casa::MosaicFT::directionCoord [protected] |
Definition at line 294 of file MosaicFT.h.
Bool casa::MosaicFT::doneWeightImage_p [protected] |
Definition at line 330 of file MosaicFT.h.
Array<Complex> casa::MosaicFT::griddedData [protected] |
Array for non-tiled gridding.
Definition at line 284 of file MosaicFT.h.
Array<DComplex> casa::MosaicFT::griddedData2 [protected] |
Definition at line 286 of file MosaicFT.h.
Array<Complex> casa::MosaicFT::griddedWeight [protected] |
Definition at line 285 of file MosaicFT.h.
Array<DComplex> casa::MosaicFT::griddedWeight2 [protected] |
Definition at line 287 of file MosaicFT.h.
ConvolveGridder<Double, Complex>* casa::MosaicFT::gridder [protected] |
Definition at line 262 of file MosaicFT.h.
LatticeCache<Complex>* casa::MosaicFT::imageCache [protected] |
Image cache.
Definition at line 255 of file MosaicFT.h.
Bool casa::MosaicFT::isTiled [protected] |
Is this tiled?
Definition at line 265 of file MosaicFT.h.
Int casa::MosaicFT::lastIndex_p [protected] |
Definition at line 318 of file MosaicFT.h.
CountedPtr<Lattice<Complex> > casa::MosaicFT::lattice [protected] |
For non-tiled gridding, this will point to arrayLattice, whereas for tiled gridding, this points to the image
Definition at line 272 of file MosaicFT.h.
String casa::MosaicFT::machineName_p [protected] |
Later this.
Definition at line 329 of file MosaicFT.h.
Float casa::MosaicFT::maxAbsData [protected] |
Definition at line 275 of file MosaicFT.h.
MSAntennaColumns* casa::MosaicFT::msac [protected] |
Antenna columns.
Definition at line 292 of file MosaicFT.h.
MSPointingColumns* casa::MosaicFT::mspc [protected] |
Pointing columns.
Definition at line 289 of file MosaicFT.h.
IPosition casa::MosaicFT::offsetLoc [protected] |
Definition at line 278 of file MosaicFT.h.
CountedPtr<SimplePBConvFunc> casa::MosaicFT::pbConvFunc_p [protected] |
Definition at line 327 of file MosaicFT.h.
MDirection::Convert* casa::MosaicFT::pointingToImage [protected] |
Definition at line 296 of file MosaicFT.h.
Int casa::MosaicFT::priorCacheSize [protected] |
Definition at line 302 of file MosaicFT.h.
SkyJones* casa::MosaicFT::sj_p [protected] |
Definition at line 239 of file MosaicFT.h.
CountedPtr<TempImage<Float> > casa::MosaicFT::skyCoverage_p [protected] |
Definition at line 325 of file MosaicFT.h.
String casa::MosaicFT::stokes_p [protected] |
Definition at line 331 of file MosaicFT.h.
Int casa::MosaicFT::tilesize [protected] |
Definition at line 259 of file MosaicFT.h.
Bool casa::MosaicFT::usezero_p [protected] |
Grid/degrid zero spacing points?
Definition at line 305 of file MosaicFT.h.
Vector<Double> casa::MosaicFT::uvOffset [protected] |
Definition at line 281 of file MosaicFT.h.
Vector<Double> casa::MosaicFT::uvScale [protected] |
Image Scaling and offset.
Definition at line 281 of file MosaicFT.h.
Int casa::MosaicFT::wConvSize [protected] |
Definition at line 316 of file MosaicFT.h.
Cube<Complex> casa::MosaicFT::weightConvFunc_p [protected] |
Definition at line 308 of file MosaicFT.h.
CountedPtr<Lattice<Complex> > casa::MosaicFT::weightLattice [protected] |
Definition at line 273 of file MosaicFT.h.
MDirection casa::MosaicFT::worldPosMeas [protected] |
Definition at line 300 of file MosaicFT.h.
Vector<Double> casa::MosaicFT::xyPos [protected] |
Definition at line 298 of file MosaicFT.h.