casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casa::rGridFT Class Reference

An FTMachine for Gridded Fourier transforms. More...

#include <rGridFT.h>

Inheritance diagram for casa::rGridFT:
casa::FTMachine casa::FTMachine

Public Member Functions

 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::String convType="SF", casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 Constructor: cachesize is the size of the cache in words (e.g. More...
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::String convType, casacore::MPosition mLocation, casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::String convType, casacore::MDirection mTangent, casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::String convType, casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (const casacore::RecordInterface &stateRec)
 Construct from a casacore::Record containing the GridFT state. More...
 
 rGridFT (const rGridFT &other)
 Copy constructor. More...
 
rGridFToperator= (const rGridFT &other)
 Assignment operator. More...
 
 ~rGridFT ()
 
void initializeToVis (casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)
 Initialize transform to Visibility plane using the image as a template. More...
 
void finalizeToVis ()
 Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used. More...
 
void initializeToSky (casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const VisBuffer &vb)
 Initialize transform to Sky plane: initializes the image. More...
 
void finalizeToSky ()
 Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used. More...
 
void get (VisBuffer &vb, casacore::Int row=-1)
 Get actual coherence from grid by degridding. More...
 
void put (const VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)
 Put coherence to grid by gridding. More...
 
void makeImage (FTMachine::Type type, VisSet &vs, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
 Make the entire image. More...
 
casacore::ImageInterface
< casacore::Complex > & 
getImage (casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)
 Get the final image: do the Fourier transform and grid-correct, then optionally normalize by the summed weights. More...
 
virtual void normalizeImage (casacore::Lattice< casacore::Complex > &, const casacore::Matrix< casacore::Double > &, casacore::Lattice< casacore::Float > &, casacore::Bool)
 
void getWeightImage (casacore::ImageInterface< casacore::Float > &, casacore::Matrix< casacore::Float > &)
 Get the final weights image. More...
 
virtual casacore::Bool toRecord (casacore::String &error, casacore::RecordInterface &outRec, casacore::Bool withImage=false, const casacore::String diskimage="")
 Save and restore the GridFT to and from a record. More...
 
virtual casacore::Bool fromRecord (casacore::String &error, const casacore::RecordInterface &inRec)
 
virtual casacore::Bool isFourier ()
 Can this FTMachine be represented by Fourier convolutions? More...
 
virtual void setNoPadding (casacore::Bool nopad)
 To make sure no padding is used in certain gridders. More...
 
virtual casacore::String name () const
 Return the name of the machine. More...
 
virtual void setMiscInfo (const casacore::Int qualifier)
 set the order of the Taylor term for MFS this is to tell A-casacore::Projection to qualify the accumulated avgPB for each Taylor term in the CFCache. More...
 
virtual void ComputeResiduals (VisBuffer &, casacore::Bool)
 Make the VB and VBStore interefaces for the interim re-factoring work. More...
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::CountedPtr< VisibilityResamplerBase > &visResampler, casacore::String convType="SF", casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 Constructor: cachesize is the size of the cache in words (e.g. More...
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::CountedPtr< VisibilityResamplerBase > &visResampler, casacore::String convType, casacore::MPosition mLocation, casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::CountedPtr< VisibilityResamplerBase > &visResampler, casacore::String convType, casacore::MDirection mTangent, casacore::Float padding=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (casacore::Long cachesize, casacore::Int tilesize, casacore::CountedPtr< VisibilityResamplerBase > &visResampler, casacore::String convType, casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false)
 
 rGridFT (const casacore::RecordInterface &stateRec)
 Construct from a casacore::Record containing the rGridFT state. More...
 
 rGridFT (const rGridFT &other)
 Copy constructor. More...
 
rGridFToperator= (const rGridFT &other)
 Assignment operator. More...
 
rGridFTclone ()
 Clone. More...
 
 ~rGridFT ()
 
void initializeToVis (casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)
 Initialize transform to Visibility plane using the image as a template. More...
 
void finalizeToVis ()
 Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being used. More...
 
void initializeToSky (casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const VisBuffer &vb)
 Initialize transform to Sky plane: initializes the image. More...
 
void finalizeToSky ()
 Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used. More...
 
void get (VisBuffer &vb, casacore::Int row=-1)
 Get actual coherence from grid by degridding. More...
 
void put (const VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)
 Put coherence to grid by gridding. More...
 
void makeImage (FTMachine::Type type, VisSet &vs, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
 Make the entire image. More...
 
casacore::ImageInterface
< casacore::Complex > & 
getImage (casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)
 Get the final image: do the Fourier transform and grid-correct, then optionally normalize by the summed weights. More...
 
virtual void normalizeImage (casacore::Lattice< casacore::Complex > &skyImage, const casacore::Matrix< casacore::Double > &sumOfWts, casacore::Lattice< casacore::Float > &sensitivityImage, casacore::Bool fftNorm)
 
void getWeightImage (casacore::ImageInterface< casacore::Float > &, casacore::Matrix< casacore::Float > &)
 Get the final weights image. More...
 
virtual casacore::Bool toRecord (casacore::String &error, casacore::RecordInterface &outRec, casacore::Bool withImage=false)
 Save and restore the rGridFT to and from a record. More...
 
virtual casacore::Bool fromRecord (casacore::String &error, const casacore::RecordInterface &inRec)
 
virtual casacore::Bool isFourier ()
 Can this FTMachine be represented by Fourier convolutions? More...
 
virtual void setNoPadding (casacore::Bool nopad)
 To make sure no padding is used in certain gridders. More...
 
virtual casacore::String name ()
 
virtual void setMiscInfo (const casacore::Int qualifier)
 set the order of the Taylor term for MFS this is to tell A-casacore::Projection to qualify the accumulated avgPB for each Taylor term in the CFCache. More...
 
virtual void ComputeResiduals (VisBuffer &vb, casacore::Bool useCorrected)
 Make the VB and VBStore interefaces for the interim re-factoring work. More...
 
- Public Member Functions inherited from casa::FTMachine
 FTMachine ()
 
 FTMachine (casacore::CountedPtr< CFCache > &cfcache, casacore::CountedPtr< ConvolutionFunction > &cfctor)
 
 FTMachine (const FTMachine &other)
 
FTMachineoperator= (const FTMachine &other)
 
void setBasePrivates (const FTMachine &other)
 
virtual ~FTMachine ()
 
virtual FTMachinecloneFTM ()
 clone copy the default cloner clones via a Record copy More...
 
virtual void initializeToVis (casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > &compImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &modelImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &weightImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &fluxScaleVec, casacore::Block< casacore::Matrix< casacore::Float > > &weightsVec, const VisBuffer &vb)
 Vectorized InitializeToVis. More...
 
virtual void initializeToVisNew (const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
 
virtual void initializeToSky (casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > &compImageVec, casacore::Block< casacore::Matrix< casacore::Float > > &weightsVec, const VisBuffer &vb, const casacore::Bool dopsf=false)
 Vectorized InitializeToSky. More...
 
virtual void initializeToSkyNew (const casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
 
virtual void finalizeToSky (casacore::ImageInterface< casacore::Complex > &iimage)
 
virtual void finalizeToSky (casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > &compImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &resImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &weightImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &fluxScaleVec, casacore::Bool dopsf, casacore::Block< casacore::Matrix< casacore::Float > > &weightsVec, const VisBuffer &vb)
 Vectorized finalizeToSky. More...
 
virtual void finalizeToSkyNew (casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
 
virtual void put (VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)
 Non const vb version - so that weights can be modified in-place Currently, used only by MultiTermFT. More...
 
virtual void correlationToStokes (casacore::ImageInterface< casacore::Complex > &compImage, casacore::ImageInterface< casacore::Float > &resImage, const casacore::Bool dopsf)
 
More...
 
virtual void stokesToCorrelation (casacore::ImageInterface< casacore::Float > &modelImage, casacore::ImageInterface< casacore::Complex > &compImage)
 
virtual void normalizeImage (casacore::ImageInterface< casacore::Float > &skyImage, casacore::Matrix< casacore::Float > &sumOfWts, casacore::ImageInterface< casacore::Float > &sensitivityImage, casacore::Bool dopsf, casacore::Float pblimit, casacore::Int normtype)
 
virtual casacore::Bool useWeightImage ()
 All FTMachines that fill weightimage, need to set this. More...
 
virtual casacore::Bool isSkyJonesSet ()
 
virtual casacore::Bool isSkyJonesChanged (VisBuffer &vb, casacore::Int row)
 
virtual void setSkyJones (casacore::Vector< casacore::CountedPtr< SkyJones > > &sj)
 Set SkyJones if image domain corrections /applycation are needed To reset the the FTMachine for stopping image based correction/applycation set in a casacore::Vector of size 0. More...
 
casacore::Bool changedSkyJonesLogic (const VisBuffer &vb, casacore::Bool &firstRow, casacore::Bool &internalRow)
 
template<typename T >
void getGrid (casacore::Array< T > &thegrid)
 
More...
 
virtual const
casacore::CountedPtr
< ConvolutionFunction > & 
getAWConvFunc ()
 
virtual void findConvFunction (const casacore::ImageInterface< casacore::Complex > &, const VisBuffer &)
 
virtual void getFluxImage (casacore::ImageInterface< casacore::Float > &image)
 Get a flux (divide by this to get a flux density correct image) image if there is one. More...
 
virtual void makeImage (FTMachine::Type type, ROVisibilityIterator &vi, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
 Make the entire image using a ROVisIter. More...
 
void girarUVW (casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
 
More...
 
void rotateUVW (casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
 
void refocus (casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Int > &ant1, const casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
 Refocus on a finite distance. More...
 
virtual casacore::Bool changed (const VisBuffer &vb)
 Has this operator changed since the last application? More...
 
casacore::Bool setSpw (casacore::Vector< casacore::Int > &spw, casacore::Bool validFrame)
 set spw for cube that will be used; More...
 
virtual casacore::Bool doublePrecGrid ()
 return whether the ftmachine is using a double precision grid More...
 
void setLocation (const casacore::MPosition &loc)
 set and get the location used for frame More...
 
casacore::MPositiongetLocation ()
 
virtual void setMovingSource (const casacore::String &sourcename)
 set a moving source aka planets or comets => adjust phase center on the fly for gridding More...
 
virtual void setMovingSource (const casacore::MDirection &mdir)
 
void setPhaseCenterTime (const casacore::Double time)
 set and get Time to calculate phasecenter -1.0 means using the time available at each iteration..this is used when the phasecenter in the field table is either a polynomial or has a ephemerides tables associated with it Using double in the units and epoch-frame of the ms(s)..caller is responsible for conversion More...
 
casacore::Double getPhaseCenterTime ()
 
virtual void reset ()
 reset stuff in an FTMachine More...
 
virtual void setFreqInterpolation (const casacore::String &method)
 set frequency interpolation type More...
 
virtual void setPointingDirColumn (const casacore::String &column="DIRECTION")
 tell ftmachine which Pointing table column to use for Direction Mosaic or Single dish ft use this for example More...
 
virtual casacore::String getPointingDirColumnInUse ()
 
virtual void setSpwChanSelection (const casacore::Cube< casacore::Int > &spwchansels)
 
virtual casacore::Cube
< casacore::Int
getSpwChanSelection ()
 
virtual void setSpwFreqSelection (const casacore::Matrix< casacore::Double > &spwfreqs)
 
virtual casacore::Matrix
< casacore::Double
getSpwFreqSelection ()
 
virtual void setCanComputeResiduals (casacore::Bool &b)
 
virtual casacore::Bool canComputeResiduals ()
 
virtual casacore::Float getPBLimit ()
 
void setnumthreads (casacore::Int n)
 virtual void ComputeResiduals(VBStore& vb)=0; get and set numthreads More...
 
casacore::Int getnumthreads ()
 
virtual void setCFCache (casacore::CountedPtr< CFCache > &cfc, const casacore::Bool resetCFC=true)
 
casacore::CountedPtr< CFCachegetCFCache ()
 
casacore::String getCacheDir ()
 
virtual void setDryRun (casacore::Bool val)
 
virtual casacore::Bool dryRun ()
 
virtual casacore::Bool isUsingCFCache ()
 

Protected Member Functions

casacore::Array
< casacore::Complex > * 
getDataPointer (const casacore::IPosition &, casacore::Bool)
 Get the appropriate data pointer. More...
 
void ok ()
 
void init ()
 
void prepGridForDegrid ()
 Prepare the grid for degridding. More...
 
casacore::Bool recordOnGrid (const VisBuffer &vb, casacore::Int rownr) const
 Is this record on Grid? check both ends. More...
 
casacore::Array
< casacore::Complex > * 
getDataPointer (const casacore::IPosition &, casacore::Bool)
 Get the appropriate data pointer. More...
 
void ok ()
 
void init ()
 
casacore::Bool recordOnGrid (const VisBuffer &vb, casacore::Int rownr) const
 Is this record on Grid? check both ends. More...
 
- Protected Member Functions inherited from casa::FTMachine
casacore::LogIOlogIO ()
 
virtual void initMaps (const VisBuffer &vb)
 
virtual void initPolInfo (const VisBuffer &vb)
 
virtual void gridOk (casacore::Int gridsupport)
 check if image is big enough for gridding More...
 
casacore::Bool matchChannel (const casacore::Int &spw, const VisBuffer &vb)
 
casacore::Bool matchAllSpwChans (const VisBuffer &vb)
 redo all spw chan match especially if ms has changed underneath More...
 
virtual casacore::Bool interpolateFrequencyTogrid (const VisBuffer &vb, const casacore::Matrix< casacore::Float > &wt, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag, casacore::Matrix< casacore::Float > &weight, FTMachine::Type type=FTMachine::OBSERVED)
 interpolate visibility data of vb to grid frequency definition flag will be set the one as described in interpolateArray1D return false if no interpolation is done...for e.g for nearest case More...
 
virtual casacore::Bool interpolateFrequencyFromgrid (VisBuffer &vb, casacore::Cube< casacore::Complex > &data, FTMachine::Type type=FTMachine::MODEL)
 degridded data interpolated back onto visibilities More...
 
virtual void getInterpolateArrays (const VisBuffer &vb, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag)
 Interpolate visibilities to be degridded upon. More...
 
void setSpectralFlag (const VisBuffer &vb, casacore::Cube< casacore::Bool > &modflagcube)
 
casacore::Bool saveMeasure (casacore::RecordInterface &rec, const casacore::String &name, casacore::String &error, const casacore::Measure &ms)
 helper to save Measures in a record More...
 

Protected Attributes

casacore::Float padding_p
 Padding in FFT. More...
 
casacore::LatticeCache
< casacore::Complex > * 
imageCache
 Image cache. More...
 
casacore::Long cachesize
 Sizes. More...
 
casacore::Int tilesize
 
casacore::ConvolveGridder
< casacore::Double,
casacore::Complex > * 
gridder
 Gridder. More...
 
casacore::Bool isTiled
 Is this tiled? More...
 
casacore::CountedPtr
< casacore::Lattice
< casacore::Complex > > 
arrayLattice
 casacore::Array lattice More...
 
casacore::CountedPtr
< casacore::Lattice
< casacore::Complex > > 
lattice
 Lattice. More...
 
casacore::String convType
 
casacore::Float maxAbsData
 
casacore::IPosition centerLoc
 Useful IPositions. More...
 
casacore::IPosition offsetLoc
 
casacore::Vector
< casacore::Double
uvScale
 Image Scaling and offset. More...
 
casacore::Vector
< casacore::Double
uvOffset
 
casacore::Int priorCacheSize
 
casacore::Bool usezero_p
 Grid/degrid zero spacing points? More...
 
casacore::Bool noPadding_p
 force no padding More...
 
casacore::Bool usePut2_p
 Check if using put that avoids non-necessary reads. More...
 
casacore::String machineName_p
 machine name More...
 
casacore::Double timemass_p
 
casacore::Double timegrid_p
 
casacore::Array
< casacore::Complex > 
griddedData
 casacore::Array for non-tiled gridding More...
 
casacore::Array
< casacore::DComplex > 
griddedData2
 
casacore::CountedPtr
< VisibilityResamplerBase
visResampler_p
 VisibilityResampler - a.k.a the "gridder" object VisibilityResampler visResampler_p; casacore::CountedPtr<MultiThreadedVisibilityResampler> visResampler_p;. More...
 
- Protected Attributes inherited from casa::FTMachine
casacore::LogIO logIO_p
 
casacore::ImageInterface
< casacore::Complex > * 
image
 
casacore::UVWMachineuvwMachine_p
 
casacore::CountedPtr
< casacore::UVWMachine
phaseShifter_p
 
casacore::MeasFrame mFrame_p
 
casacore::Bool tangentSpecified_p
 Direction of desired tangent plane. More...
 
casacore::MDirection mTangent_p
 
casacore::MDirection mImage_p
 
casacore::MDirection movingDir_p
 moving source stuff More...
 
casacore::Bool fixMovingSource_p
 
casacore::MDirection firstMovingDir_p
 
casacore::Double distance_p
 
casacore::uInt nAntenna_p
 
casacore::Int lastFieldId_p
 
casacore::Int lastMSId_p
 
casacore::Bool useDoubleGrid_p
 Use douple precision grid in gridding process. More...
 
casacore::Matrix
< casacore::Double
sumWeight
 Sum of weights per polarization and per chan. More...
 
casacore::Matrix
< casacore::Double
sumCFWeight
 
casacore::Int nx
 Sizes. More...
 
casacore::Int ny
 
casacore::Int npol
 
casacore::Int nchan
 
casacore::Int nvischan
 
casacore::Int nvispol
 
casacore::Vector< casacore::IntchanMap
 Maps of channels and polarization. More...
 
casacore::Vector< casacore::IntpolMap
 
casacore::Bool isIOnly
 Is casacore::Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR. More...
 
casacore::MPosition mLocation_p
 Default Position used for phase rotations. More...
 
casacore::Bool doUVWRotation_p
 Set if uvwrotation is necessary. More...
 
casacore::Block
< casacore::Vector
< casacore::Int > > 
multiChanMap_p
 setup multiple spectral window for cubes More...
 
casacore::Vector< casacore::IntselectedSpw_p
 
casacore::Vector< casacore::IntnVisChan_p
 
casacore::SpectralCoordinate spectralCoord_p
 Private variables needed for spectral frame conversion. More...
 
casacore::Vector< casacore::BooldoConversion_p
 
casacore::Bool freqFrameValid_p
 
casacore::Vector
< casacore::Double
imageFreq_p
 
casacore::Vector
< casacore::Double
lsrFreq_p
 casacore::Vector of float lsrfreq needed for regridding More...
 
casacore::Vector
< casacore::Double
interpVisFreq_p
 
casacore::InterpolateArray1D
< casacore::Double,
casacore::Complex >
::InterpolationMethod 
freqInterpMethod_p
 
casacore::String pointingDirCol_p
 
casacore::Cube< casacore::IntspwChanSelFlag_p
 
casacore::Matrix
< casacore::Double
spwFreqSel_p
 
casacore::Matrix
< casacore::Double
expandedSpwFreqSel_p
 
casacore::Matrix
< casacore::Double
expandedSpwConjFreqSel_p
 
casacore::Vector< casacore::IntcfStokes_p
 
casacore::Int polInUse_p
 
casacore::CountedPtr< CFCachecfCache_p
 
CFStore cfs_p
 
CFStore cfwts_p
 
casacore::CountedPtr< CFStore2cfs2_p
 
casacore::CountedPtr< CFStore2cfwts2_p
 
casacore::CountedPtr
< ConvolutionFunction
convFuncCtor_p
 
casacore::CountedPtr
< PolOuterProduct
pop_p
 
casacore::Bool canComputeResiduals_p
 
casacore::Bool toVis_p
 
casacore::Int numthreads_p
 
casacore::Array
< casacore::Complex > 
griddedData
 casacore::Array for non-tiled gridding These are common to most FTmachines More...
 
casacore::Array
< casacore::DComplex > 
griddedData2
 
casacore::Float pbLimit_p
 
casacore::Vector
< casacore::CountedPtr
< SkyJones > > 
sj_p
 casacore::Vector<SkyJones *> sj_p; More...
 
casacore::CountedPtr
< casacore::ImageInterface
< casacore::Complex > > 
cmplxImage_p
 A holder for the complex image if nobody else is keeping it. More...
 
FFT2D ft_p
 
casacore::Double phaseCenterTime_p
 

Additional Inherited Members

- Public Types inherited from casa::FTMachine
enum  Type {
  OBSERVED,
  MODEL,
  CORRECTED,
  RESIDUAL,
  PSF,
  COVERAGE,
  N_types,
  DEFAULT
}
 Types of known Images that may be made using the makeImage method. More...
 
- Static Public Member Functions inherited from casa::FTMachine
static void locateuvw (const casacore::Double *&uvw, const casacore::Double *&dphase, const casacore::Double *&freq, const casacore::Int &nchan, const casacore::Double *&scale, const casacore::Double *&offset, const casacore::Int &sampling, casacore::Int *&loc, casacore::Int *&off, casacore::Complex *&phasor, const casacore::Int &row, const casacore::Bool &doW=false)
 helper function for openmp to call...no private dependency More...
 
- Public Attributes inherited from casa::FTMachine
casacore::Bool isDryRun
 

Detailed Description

An FTMachine for Gridded Fourier transforms.

Intended use:

Public interface

Prerequisite

Etymology

FTMachine is a Machine for Fourier Transforms. GridFT does Grid-based Fourier transforms.

Synopsis

The SkyEquation needs to be able to perform Fourier transforms on visibility data. GridFT allows efficient Fourier Transform processing using a VisBuffer which encapsulates a chunk of visibility (typically all baselines for one time) together with all the information needed for processing (e.g. UVW coordinates).

Gridding and degridding in GridFT are performed using a novel sort-less algorithm. In this approach, the gridded plane is divided into small patches, a cache of which is maintained in memory using a general-purpose LatticeCache class. As the (time-sorted) visibility data move around slowly in the Fourier plane, patches are swapped in and out as necessary. Thus, optimally, one would keep at least one patch per baseline.

A grid cache is defined on construction. If the gridded uv plane is smaller than this, it is kept entirely in memory and all gridding and degridding is done entirely in memory. Otherwise a cache of tiles is kept an paged in and out as necessary. Optimally the cache should be big enough to hold all polarizations and frequencies for all baselines. The paging rate will then be small. As the cache size is reduced below this critical value, paging increases. The algorithm will work for only one patch but it will be very slow!

This scheme works well for arrays having a moderate number of antennas since the saving in space goes as the ratio of baselines to image size. For the ATCA, VLBA and WSRT, this ratio is quite favorable. For the VLA, one requires images of greater than about 200 pixels on a side to make it worthwhile.

The FFT step is done plane by plane for images having less than 1024 * 1024 pixels on each plane, and line by line otherwise.

The gridding and degridding steps are implemented in Fortran for speed. In gridding, the visibilities are added onto the grid points in the neighborhood using a weighting function. In degridding, the value is derived by a weight summ of the same points, using the same weighting function.

Example

See the example for SkyModel.

Motivation

Define an interface to allow efficient processing of chunks of visibility data

Intended use:

Public interface

Prerequisite

Etymology

FTMachine is a Machine for Fourier Transforms. rGridFT does Grid-based Fourier transforms.

Synopsis

The SkyEquation needs to be able to perform Fourier transforms on visibility data. rGridFT allows efficient Fourier Transform processing using a VisBuffer which encapsulates a chunk of visibility (typically all baselines for one time) together with all the information needed for processing (e.g. UVW coordinates).

Gridding and degridding in rGridFT are performed using a novel sort-less algorithm. In this approach, the gridded plane is divided into small patches, a cache of which is maintained in memory using a general-purpose LatticeCache class. As the (time-sorted) visibility data move around slowly in the Fourier plane, patches are swapped in and out as necessary. Thus, optimally, one would keep at least one patch per baseline.

A grid cache is defined on construction. If the gridded uv plane is smaller than this, it is kept entirely in memory and all gridding and degridding is done entirely in memory. Otherwise a cache of tiles is kept an paged in and out as necessary. Optimally the cache should be big enough to hold all polarizations and frequencies for all baselines. The paging rate will then be small. As the cache size is reduced below this critical value, paging increases. The algorithm will work for only one patch but it will be very slow!

This scheme works well for arrays having a moderate number of antennas since the saving in space goes as the ratio of baselines to image size. For the ATCA, VLBA and WSRT, this ratio is quite favorable. For the VLA, one requires images of greater than about 200 pixels on a side to make it worthwhile.

The FFT step is done plane by plane for images having less than 1024 * 1024 pixels on each plane, and line by line otherwise.

The gridding and degridding steps are implemented in Fortran for speed. In gridding, the visibilities are added onto the grid points in the neighborhood using a weighting function. In degridding, the value is derived by a weight summ of the same points, using the same weighting function.

Example

See the example for SkyModel.

Motivation

Define an interface to allow efficient processing of chunks of visibility data

Definition at line 127 of file rGridFT.h.

Constructor & Destructor Documentation

casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::String  convType = "SF",
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::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), and convType is the type of gridding used (SF is prolate spheriodal wavefunction, and BOX is plain box-car summation). mLocation is the position to be used in some phase rotations. If mTangent is specified then the uvw rotation is done for that location iso the image center.

casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::String  convType,
casacore::MPosition  mLocation,
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::String  convType,
casacore::MDirection  mTangent,
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::String  convType,
casacore::MPosition  mLocation,
casacore::MDirection  mTangent,
casacore::Float  passing = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( const casacore::RecordInterface stateRec)

Construct from a casacore::Record containing the GridFT state.

casa::rGridFT::rGridFT ( const rGridFT other)

Copy constructor.

casa::rGridFT::~rGridFT ( )
casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::CountedPtr< VisibilityResamplerBase > &  visResampler,
casacore::String  convType = "SF",
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::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), and convType is the type of gridding used (SF is prolate spheriodal wavefunction, and BOX is plain box-car summation). mLocation is the position to be used in some phase rotations. If mTangent is specified then the uvw rotation is done for that location iso the image center.

casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::CountedPtr< VisibilityResamplerBase > &  visResampler,
casacore::String  convType,
casacore::MPosition  mLocation,
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::CountedPtr< VisibilityResamplerBase > &  visResampler,
casacore::String  convType,
casacore::MDirection  mTangent,
casacore::Float  padding = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( casacore::Long  cachesize,
casacore::Int  tilesize,
casacore::CountedPtr< VisibilityResamplerBase > &  visResampler,
casacore::String  convType,
casacore::MPosition  mLocation,
casacore::MDirection  mTangent,
casacore::Float  passing = 1.0,
casacore::Bool  usezero = true,
casacore::Bool  useDoublePrec = false 
)
casa::rGridFT::rGridFT ( const casacore::RecordInterface stateRec)

Construct from a casacore::Record containing the rGridFT state.

casa::rGridFT::rGridFT ( const rGridFT other)

Copy constructor.

casa::rGridFT::~rGridFT ( )

Member Function Documentation

rGridFT* casa::rGridFT::clone ( )

Clone.

virtual void casa::rGridFT::ComputeResiduals ( VisBuffer vb,
casacore::Bool  useCorrected 
)
inlinevirtual

Make the VB and VBStore interefaces for the interim re-factoring work.

Finally removed the VB interface.

Implements casa::FTMachine.

Definition at line 222 of file rGridFT.h.

virtual void casa::rGridFT::ComputeResiduals ( VisBuffer vb,
casacore::Bool  useCorrected 
)
virtual

Make the VB and VBStore interefaces for the interim re-factoring work.

Finally removed the VB interface.

Implements casa::FTMachine.

void casa::rGridFT::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::rGridFT::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::rGridFT::finalizeToVis ( )
virtual

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

Implements casa::FTMachine.

void casa::rGridFT::finalizeToVis ( )
virtual

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

Implements casa::FTMachine.

virtual casacore::Bool casa::rGridFT::fromRecord ( casacore::String error,
const casacore::RecordInterface inRec 
)
virtual

Reimplemented from casa::FTMachine.

virtual casacore::Bool casa::rGridFT::fromRecord ( casacore::String error,
const casacore::RecordInterface inRec 
)
virtual

Reimplemented from casa::FTMachine.

void casa::rGridFT::get ( VisBuffer vb,
casacore::Int  row = -1 
)
virtual

Get actual coherence from grid by degridding.

Implements casa::FTMachine.

void casa::rGridFT::get ( VisBuffer vb,
casacore::Int  row = -1 
)
virtual

Get actual coherence from grid by degridding.

Implements casa::FTMachine.

casacore::Array<casacore::Complex>* casa::rGridFT::getDataPointer ( const casacore::IPosition ,
casacore::Bool   
)
protected

Get the appropriate data pointer.

casacore::Array<casacore::Complex>* casa::rGridFT::getDataPointer ( const casacore::IPosition ,
casacore::Bool   
)
protected

Get the appropriate data pointer.

casacore::ImageInterface<casacore::Complex>& casa::rGridFT::getImage ( casacore::Matrix< casacore::Float > &  ,
casacore::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.

casacore::ImageInterface<casacore::Complex>& casa::rGridFT::getImage ( casacore::Matrix< casacore::Float > &  ,
casacore::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.

void casa::rGridFT::getWeightImage ( casacore::ImageInterface< casacore::Float > &  ,
casacore::Matrix< casacore::Float > &   
)
virtual

Get the final weights image.

Implements casa::FTMachine.

void casa::rGridFT::getWeightImage ( casacore::ImageInterface< casacore::Float > &  ,
casacore::Matrix< casacore::Float > &   
)
virtual

Get the final weights image.

Implements casa::FTMachine.

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

Initialize transform to Sky plane: initializes the image.

Implements casa::FTMachine.

void casa::rGridFT::initializeToSky ( casacore::ImageInterface< casacore::Complex > &  image,
casacore::Matrix< casacore::Float > &  weight,
const VisBuffer vb 
)
virtual

Initialize transform to Sky plane: initializes the image.

Implements casa::FTMachine.

void casa::rGridFT::initializeToVis ( casacore::ImageInterface< casacore::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.

void casa::rGridFT::initializeToVis ( casacore::ImageInterface< casacore::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.

virtual casacore::Bool casa::rGridFT::isFourier ( )
inlinevirtual

Can this FTMachine be represented by Fourier convolutions?

Reimplemented from casa::FTMachine.

Definition at line 216 of file rGridFT.h.

virtual casacore::Bool casa::rGridFT::isFourier ( )
inlinevirtual

Can this FTMachine be represented by Fourier convolutions?

Reimplemented from casa::FTMachine.

Definition at line 221 of file rGridFT.h.

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

Make the entire image.

Reimplemented from casa::FTMachine.

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

Make the entire image.

Reimplemented from casa::FTMachine.

virtual casacore::String casa::rGridFT::name ( ) const
virtual

Return the name of the machine.

Implements casa::FTMachine.

virtual casacore::String casa::rGridFT::name ( )
virtual
virtual void casa::rGridFT::normalizeImage ( casacore::Lattice< casacore::Complex > &  ,
const casacore::Matrix< casacore::Double > &  ,
casacore::Lattice< casacore::Float > &  ,
casacore::Bool   
)
inlinevirtual

Reimplemented from casa::FTMachine.

Definition at line 201 of file rGridFT.h.

virtual void casa::rGridFT::normalizeImage ( casacore::Lattice< casacore::Complex > &  skyImage,
const casacore::Matrix< casacore::Double > &  sumOfWts,
casacore::Lattice< casacore::Float > &  sensitivityImage,
casacore::Bool  fftNorm 
)
inlinevirtual

Reimplemented from casa::FTMachine.

Definition at line 206 of file rGridFT.h.

void casa::rGridFT::ok ( )
protectedvirtual

Reimplemented from casa::FTMachine.

void casa::rGridFT::ok ( )
protectedvirtual

Reimplemented from casa::FTMachine.

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

Assignment operator.

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

Assignment operator.

void casa::rGridFT::prepGridForDegrid ( )
protected

Prepare the grid for degridding.

void casa::rGridFT::put ( const VisBuffer vb,
casacore::Int  row = -1,
casacore::Bool  dopsf = false,
FTMachine::Type  type = FTMachine::OBSERVED 
)
virtual

Put coherence to grid by gridding.

Implements casa::FTMachine.

void casa::rGridFT::put ( const VisBuffer vb,
casacore::Int  row = -1,
casacore::Bool  dopsf = false,
FTMachine::Type  type = FTMachine::OBSERVED 
)
virtual

Put coherence to grid by gridding.

Implements casa::FTMachine.

casacore::Bool casa::rGridFT::recordOnGrid ( const VisBuffer vb,
casacore::Int  rownr 
) const
protected

Is this record on Grid? check both ends.

This assumes that the ends bracket the middle

casacore::Bool casa::rGridFT::recordOnGrid ( const VisBuffer vb,
casacore::Int  rownr 
) const
protected

Is this record on Grid? check both ends.

This assumes that the ends bracket the middle

virtual void casa::rGridFT::setMiscInfo ( const casacore::Int  qualifier)
inlinevirtual

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

Implements casa::FTMachine.

Definition at line 221 of file rGridFT.h.

virtual void casa::rGridFT::setMiscInfo ( const casacore::Int  qualifier)
inlinevirtual

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

Implements casa::FTMachine.

Definition at line 226 of file rGridFT.h.

virtual void casa::rGridFT::setNoPadding ( casacore::Bool  nopad)
inlinevirtual

To make sure no padding is used in certain gridders.

Reimplemented from casa::FTMachine.

Definition at line 218 of file rGridFT.h.

References noPadding_p.

virtual void casa::rGridFT::setNoPadding ( casacore::Bool  nopad)
inlinevirtual

To make sure no padding is used in certain gridders.

Reimplemented from casa::FTMachine.

Definition at line 223 of file rGridFT.h.

References noPadding_p.

virtual casacore::Bool casa::rGridFT::toRecord ( casacore::String error,
casacore::RecordInterface outRec,
casacore::Bool  withImage = false,
const casacore::String  diskimage = "" 
)
virtual

Save and restore the GridFT to and from a record.

Reimplemented from casa::FTMachine.

virtual casacore::Bool casa::rGridFT::toRecord ( casacore::String error,
casacore::RecordInterface outRec,
casacore::Bool  withImage = false 
)
virtual

Save and restore the rGridFT to and from a record.

Member Data Documentation

casacore::CountedPtr< casacore::Lattice< casacore::Complex > > casa::rGridFT::arrayLattice
protected

casacore::Array lattice

Definition at line 259 of file rGridFT.h.

casacore::Long casa::rGridFT::cachesize
protected

Sizes.

Definition at line 249 of file rGridFT.h.

casacore::IPosition casa::rGridFT::centerLoc
protected

Useful IPositions.

Definition at line 270 of file rGridFT.h.

casacore::String casa::rGridFT::convType
protected

Definition at line 265 of file rGridFT.h.

casacore::Array<casacore::Complex> casa::rGridFT::griddedData
protected

casacore::Array for non-tiled gridding

Definition at line 277 of file rGridFT.h.

casacore::Array<casacore::DComplex> casa::rGridFT::griddedData2
protected

Definition at line 278 of file rGridFT.h.

casacore::ConvolveGridder< casacore::Double, casacore::Complex > * casa::rGridFT::gridder
protected

Gridder.

Definition at line 253 of file rGridFT.h.

casacore::LatticeCache< casacore::Complex > * casa::rGridFT::imageCache
protected

Image cache.

Definition at line 246 of file rGridFT.h.

casacore::Bool casa::rGridFT::isTiled
protected

Is this tiled?

Definition at line 256 of file rGridFT.h.

casacore::CountedPtr< casacore::Lattice< casacore::Complex > > casa::rGridFT::lattice
protected

Lattice.

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

Definition at line 263 of file rGridFT.h.

casacore::String casa::rGridFT::machineName_p
protected

machine name

Definition at line 289 of file rGridFT.h.

casacore::Float casa::rGridFT::maxAbsData
protected

Definition at line 267 of file rGridFT.h.

casacore::Bool casa::rGridFT::noPadding_p
protected

force no padding

Definition at line 283 of file rGridFT.h.

Referenced by setNoPadding().

casacore::IPosition casa::rGridFT::offsetLoc
protected

Definition at line 270 of file rGridFT.h.

casacore::Float casa::rGridFT::padding_p
protected

Padding in FFT.

Definition at line 222 of file rGridFT.h.

casacore::Int casa::rGridFT::priorCacheSize
protected

Definition at line 276 of file rGridFT.h.

casacore::Int casa::rGridFT::tilesize
protected

Definition at line 250 of file rGridFT.h.

casacore::Double casa::rGridFT::timegrid_p
protected

Definition at line 291 of file rGridFT.h.

casacore::Double casa::rGridFT::timemass_p
protected

Definition at line 291 of file rGridFT.h.

casacore::Bool casa::rGridFT::usePut2_p
protected

Check if using put that avoids non-necessary reads.

Definition at line 286 of file rGridFT.h.

casacore::Bool casa::rGridFT::usezero_p
protected

Grid/degrid zero spacing points?

Definition at line 280 of file rGridFT.h.

casacore::Vector< casacore::Double > casa::rGridFT::uvOffset
protected

Definition at line 273 of file rGridFT.h.

casacore::Vector< casacore::Double > casa::rGridFT::uvScale
protected

Image Scaling and offset.

Definition at line 273 of file rGridFT.h.

casacore::CountedPtr<VisibilityResamplerBase> casa::rGridFT::visResampler_p
protected

VisibilityResampler - a.k.a the "gridder" object VisibilityResampler visResampler_p; casacore::CountedPtr<MultiThreadedVisibilityResampler> visResampler_p;.

Definition at line 298 of file rGridFT.h.


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