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

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

#include <ConvFuncDiskCache.h>

Public Member Functions

 ConvFuncDiskCache ()
 
ConvFuncDiskCacheoperator= (const ConvFuncDiskCache &other)
 
 ~ConvFuncDiskCache ()
 
void setCacheDir (const char *dir)
 
void initCache ()
 
void cacheConvFunction (casacore::Int which, casacore::Float pa, casacore::Array< casacore::Complex > &cf, casacore::CoordinateSystem &coords, casacore::CoordinateSystem &ftcoords, casacore::Int &convSize, casacore::Cube< casacore::Int > &convSupport, casacore::Float convSampling, casacore::String nameQualifier="", casacore::Bool savePA=true)
 
void cacheWeightsFunction (casacore::Int which, casacore::Float pa, casacore::Array< casacore::Complex > &cfWt, casacore::CoordinateSystem &coords, casacore::Int &convSize, casacore::Cube< casacore::Int > &convSupport, casacore::Float convSampling)
 
casacore::Bool searchConvFunction (const VisBuffer &vb, VPSkyJones &vpSJ, casacore::Int &which, casacore::Float &pa)
 
casacore::Bool searchConvFunction (const VisBuffer &vb, ParAngleChangeDetector &vpSJ, casacore::Int &which, casacore::Float &pa)
 
casacore::Bool loadConvFunction (casacore::Int where, casacore::Int Nx, casacore::PtrBlock< casacore::Array< casacore::Complex > * > &convFuncCache, casacore::Cube< casacore::Int > &convSupport, casacore::Vector< casacore::Float > &convSampling, casacore::Double &cfRefFreq, casacore::CoordinateSystem &coordys, casacore::String prefix="/CF")
 
void finalize ()
 
void finalize (casacore::ImageInterface< casacore::Float > &avgPB)
 
void loadAvgPB (casacore::ImageInterface< casacore::Float > &avgPB)
 

Private Attributes

casacore::Vector< casacore::FloatpaList
 
casacore::Vector< casacore::FloatSampling
 
casacore::Cube< casacore::IntXSup
 
casacore::Cube< casacore::IntYSup
 
casacore::String Dir
 
casacore::String cfPrefix
 
casacore::String aux
 

Detailed Description

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

Intended use:

Public interface

Prerequisite

pre-requisites.

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, 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 to search and load convolution functions from the disk. If a new convolution function is computed in PBWProjectFT, 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).

Definition at line 107 of file ConvFuncDiskCache.h.

Constructor & Destructor Documentation

casa::ConvFuncDiskCache::ConvFuncDiskCache ( )
inline

Definition at line 110 of file ConvFuncDiskCache.h.

casa::ConvFuncDiskCache::~ConvFuncDiskCache ( )
inline

Definition at line 112 of file ConvFuncDiskCache.h.

Member Function Documentation

void casa::ConvFuncDiskCache::cacheConvFunction ( casacore::Int  which,
casacore::Float  pa,
casacore::Array< casacore::Complex > &  cf,
casacore::CoordinateSystem coords,
casacore::CoordinateSystem ftcoords,
casacore::Int convSize,
casacore::Cube< casacore::Int > &  convSupport,
casacore::Float  convSampling,
casacore::String  nameQualifier = "",
casacore::Bool  savePA = true 
)
void casa::ConvFuncDiskCache::cacheWeightsFunction ( casacore::Int  which,
casacore::Float  pa,
casacore::Array< casacore::Complex > &  cfWt,
casacore::CoordinateSystem coords,
casacore::Int convSize,
casacore::Cube< casacore::Int > &  convSupport,
casacore::Float  convSampling 
)
void casa::ConvFuncDiskCache::finalize ( )
void casa::ConvFuncDiskCache::finalize ( casacore::ImageInterface< casacore::Float > &  avgPB)
void casa::ConvFuncDiskCache::initCache ( )
void casa::ConvFuncDiskCache::loadAvgPB ( casacore::ImageInterface< casacore::Float > &  avgPB)
casacore::Bool casa::ConvFuncDiskCache::loadConvFunction ( casacore::Int  where,
casacore::Int  Nx,
casacore::PtrBlock< casacore::Array< casacore::Complex > * > &  convFuncCache,
casacore::Cube< casacore::Int > &  convSupport,
casacore::Vector< casacore::Float > &  convSampling,
casacore::Double cfRefFreq,
casacore::CoordinateSystem coordys,
casacore::String  prefix = "/CF" 
)
ConvFuncDiskCache& casa::ConvFuncDiskCache::operator= ( const ConvFuncDiskCache other)
casacore::Bool casa::ConvFuncDiskCache::searchConvFunction ( const VisBuffer vb,
VPSkyJones vpSJ,
casacore::Int which,
casacore::Float pa 
)
casacore::Bool casa::ConvFuncDiskCache::searchConvFunction ( const VisBuffer vb,
ParAngleChangeDetector vpSJ,
casacore::Int which,
casacore::Float pa 
)
void casa::ConvFuncDiskCache::setCacheDir ( const char *  dir)
inline

Definition at line 113 of file ConvFuncDiskCache.h.

References Dir.

Member Data Documentation

casacore::String casa::ConvFuncDiskCache::aux
private

Definition at line 132 of file ConvFuncDiskCache.h.

casacore::String casa::ConvFuncDiskCache::cfPrefix
private

Definition at line 132 of file ConvFuncDiskCache.h.

casacore::String casa::ConvFuncDiskCache::Dir
private

Definition at line 132 of file ConvFuncDiskCache.h.

Referenced by setCacheDir().

casacore::Vector<casacore::Float> casa::ConvFuncDiskCache::paList
private

Definition at line 130 of file ConvFuncDiskCache.h.

casacore::Vector<casacore::Float> casa::ConvFuncDiskCache::Sampling
private

Definition at line 130 of file ConvFuncDiskCache.h.

casacore::Cube<casacore::Int> casa::ConvFuncDiskCache::XSup
private

Definition at line 131 of file ConvFuncDiskCache.h.

casacore::Cube<casacore::Int> casa::ConvFuncDiskCache::YSup
private

Definition at line 131 of file ConvFuncDiskCache.h.


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