ConvFuncDiskCache.h

Classes

ConvFuncDiskCache --

An object to manage the caches of pre-computed convolution functions on the disk and in the memory.

(full description)


class ConvFuncDiskCache

Interface

Public Members
ConvFuncDiskCache():paList(),XSup(),YSup(), cfPrefix("CF"), aux("aux.dat")
~ConvFuncDiskCache()
void setCacheDir(const char *dir)
void initCache()
void cacheConvFunction(Int which, Float pa, Array<Complex>& cf, CoordinateSystem& coords, Int& convSize, CoordinateSystem<Int>& convSupport, Float convSampling)
Bool searchConvFunction(const VisBuffer& vb, VPSkyJones& vpSJ, Int& which, Float &pa)
Bool searchConvFunction(const VisBuffer& vb, ParAngleChangeDetector& vpSJ, Int& which, Float &pa)
Bool loadConvFunction(Int where, Int Nx, PtrBlock < Array<Complex> *> & convFuncCache, Cube<Int> &convSupport, Cube<Float>& convSampling)
void finalize()
void finalize(ImageInterface<Float>& avgPB)
void loadAvgPB(ImageInterface<Float>& avgPB)

Description

Prerequisite

Etymology

ConvFuncDiskCache is an object, to write convolution functions from the memory cache to the disk cache, and search/load the disk cache for convolution functions for a give Parallactic Angle.

Synopsis

FTMachines uses pre-computed convolution functions for gridding (FTMachine::put()) and prediction (FTMachine::get()). For PBWProjectFT<\linkto>, the convolution function computation is expensive. Once computed, it is efficient to cache these functions as a function of Parallactic Angle and the value of the w-term (if significant).

ConvFuncDiskCache class provides interface to the disk cache and is used in PBWProjectFT<\linkto> to search and load convolution functions from the disk. If a new convolution function is computed in PBWProjectFT<\linkto>, the disk cache is updated using the services of this class as well.

Example

Motivation

Factor out the code for managing convolution function caches (memory and disk caches) from the FTMachine code. This is a specialized service, and has nothing to do with the details of gridding and prediction of visibilities (which is the function of FTMachines).

To Do