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


More...

#include <CFCache.h>

Public Types

typedef casacore::Vector< CFStoreCFStoreCacheType
 
typedef casacore::Vector
< CFStore2
CFStoreCacheType2
 
typedef std::vector< CFCacheTableCFCacheTableType
 

Public Member Functions

 CFCache (const char *cfDir="CF")
 
CFCacheoperator= (const CFCache &other)
 
 ~CFCache ()
 
void setCacheDir (const char *dir)
 Method to set the disk cache directory name. More...
 
casacore::String getCacheDir (CFCDirType dirType=USERDIR)
 
void setWtImagePrefix (const char *prefix)
 
casacore::String getWtImagePrefix ()
 
void setLazyFill (const casacore::Bool &val)
 
casacore::Bool isLazyFillOn ()
 
void initCache ()
 Method to initialize the internal memory cache. More...
 
void initCache2 (casacore::Bool verbose=false, casacore::Float selectedPA=400.0, casacore::Float dPA=-1.0)
 
void initCacheFromList2 (const casacore::String &path, const casacore::Vector< casacore::String > &cfFileNames, const casacore::Vector< casacore::String > &cfWtFileNames, casacore::Float selectedPA, casacore::Float dPA, const casacore::Int verbose=1)
 
void initPolMaps (PolMapType &polMap, PolMapType &conjPolMap)
 
casacore::Bool OTODone ()
 
casacore::Long size ()
 Compute the size of the memory cache in bytes. More...
 
void setPAChangeDetector (const ParAngleChangeDetector &paCD)
 Method to set the class to caluclate the differential Parallactic Angle. More...
 
void cacheConvFunction (CFStore &cfs, casacore::String nameQualifier="", casacore::Bool savePA=true)
 Methods to cache the convolution function. More...
 
void cacheConvFunction (const casacore::Quantity pa, CFStore &cfs, casacore::String nameQualifier="", casacore::Bool savePA=true)
 

One level lower - the Parallactic angle can be separately provided. More...

 
void cacheConvFunction (const casacore::Float pa, CFStore &cfs, casacore::String nameQualifier="", casacore::Bool savePA=true)
 

The Parallactic angle as a floating point number in radians. More...

 
casacore::Int cacheConvFunction (casacore::Int which, const casacore::Float &pa, CFType &cf, casacore::CoordinateSystem &coords, casacore::CoordinateSystem &ftcoords, casacore::Int &convSize, casacore::Vector< casacore::Int > &xConvSupport, casacore::Vector< casacore::Int > &yConvSupport, casacore::Float convSampling, casacore::String nameQualifier="", casacore::Bool savePA=true)
 

Lowest level - all information about CFStore is explicitly provided as basic types More...

 
casacore::Bool searchConvFunction (casacore::Int &which, const casacore::Quantity pa, const casacore::Quantity dPA)
 

Methods to sarch for a convolution function in the caches (disk or memory) for the give Parallactic Angle value. More...

 
casacore::Bool searchConvFunction (casacore::Int &which, const casacore::Float pa, const casacore::Float dPA)
 
casacore::Int loadFromDisk (casacore::Int where, casacore::Float pa, casacore::Float dPA, casacore::Int Nx, CFStoreCacheType &convFuncCache, CFStore &cfs, casacore::String nameQualifier="")
 Lower level method to load a convolution function from the disk. More...
 
casacore::Int locateConvFunction (CFStore &cfs, CFStore &cftws, const casacore::Int Nw, const casacore::Quantity pa, const casacore::Quantity dPA, const casacore::Int mosXPos=0, const casacore::Int mosYPos=0)
 Method to locate a convolution function for the given w-term index and PA value. More...
 
casacore::Int locateConvFunction (CFStore &cfs, const casacore::Int Nw, const casacore::Quantity pa, const casacore::Quantity dPA, const casacore::String &nameQualifier="", const casacore::Int mosXPos=0, const casacore::Int mosYPos=0)
 
casacore::Int locateConvFunction (CFStore &cfs, CFStore &cfwts, const casacore::Int Nw, const casacore::Float pa, const casacore::Float dPA, const casacore::Int mosXPos=0, const casacore::Int mosYPos=0)
 
casacore::Int locateConvFunction (CFStore &cfs, const casacore::Int Nw, const casacore::Float pa, const casacore::Float dPA, const casacore::String &nameQualifier="", const casacore::Int mosXPos=0, const casacore::Int mosYPos=0)
 
casacore::TableRecord getCFParams (const casacore::String &fileName, casacore::Array< casacore::Complex > &pixelBuffer, casacore::CoordinateSystem &coordSys, casacore::Double &sampling, casacore::Double &paVal, casacore::Int &xSupport, casacore::Int &ySupport, casacore::Double &fVal, casacore::Double &wVal, casacore::Int &mVal, casacore::Double &conjFreq, casacore::Int &conjPoln, casacore::Bool loadPixels=true)
 
void flush ()
 Methods to write the auxillary information from the memory cache to the disk cache. More...
 
void flush (casacore::ImageInterface< casacore::Float > &avgPB, casacore::String qualifier=casacore::String(""))
 
casacore::Int loadAvgPB (casacore::ImageInterface< casacore::Float > &avgPB, casacore::String qualifier=casacore::String(""))
 
casacore::Int loadAvgPB (casacore::CountedPtr< casacore::ImageInterface< casacore::Float > > &avgPB, casacore::String qualifier=casacore::String(""))
 
casacore::Int loadWtImage (casacore::ImageInterface< casacore::Float > &avgPB, casacore::String qualifier)
 loadAvgPB calls the method below if WtImgPrefix was set. More...
 
casacore::Bool avgPBReady (const casacore::String &qualifier=casacore::String(""))
 
void summarize (CFStoreCacheType2 &memCache, const casacore::String &message, const casacore::Bool cfsInfo=true)
 

Public Attributes

CFStoreCacheType2 memCache2_p
 
CFStoreCacheType2 memCacheWt2_p
 

Private Member Functions

void makeFTCoordSys (const casacore::CoordinateSystem &coords, const casacore::Int &convSize, const casacore::Vector< casacore::Double > &ftRef, casacore::CoordinateSystem &ftCoords)
 Internal method to convert the direction co-ordinates of the given casacore::CoordinateSystem to its Fourier conjuguate co-ordinates. More...
 
casacore::Int addToMemCache (CFStoreCacheType &cfCache, casacore::Float pa, CFType *cf, casacore::CoordinateSystem &coords, casacore::Vector< casacore::Int > &xConvSupport, casacore::Vector< casacore::Int > &yConvSupport, casacore::Float convSampling)
 Internal method to add the given convolution function to the memory cache. More...
 
CFStoreCacheTypegetMEMCacheObj (const casacore::String &nameQualifier)
 
void fillCFSFromDisk (const casacore::Directory dirObj, const casacore::String &pattern, CFStoreCacheType2 &memStore, casacore::Bool showInfo=false, casacore::Float selectPAVal=400.0, casacore::Float dPA=-1.0, const casacore::Int verbose=1)
 
void fillCFListFromDisk (const casacore::Vector< casacore::String > &fileNames, const casacore::String &CFCDir, CFStoreCacheType2 &memStore, casacore::Bool showInfo, casacore::Float selectPAVal, casacore::Float dPA, const casacore::Int verbose=1)
 

Private Attributes

CFStoreCacheType memCache_p
 
CFStoreCacheType memCacheWt_p
 
CFCacheTableType cfCacheTable_p
 
casacore::Matrix< casacore::IntXSup
 
casacore::Matrix< casacore::IntYSup
 
casacore::Vector< casacore::FloatpaList
 
casacore::Vector< casacore::FloatSampling
 
std::vector< casacore::FloatpaList_p
 
casacore::Matrix< casacore::Floatkey2IndexMap
 
casacore::String Dir
 
casacore::String WtImagePrefix
 
casacore::String cfPrefix
 
casacore::String aux
 
ParAngleChangeDetector paCD_p
 
casacore::Bool avgPBReady_p
 
casacore::String avgPBReadyQualifier_p
 
casacore::Bool OTODone_p
 
casacore::Bool loadPixBuf_p
 

Detailed Description


Definition at line 147 of file CFCache.h.

Member Typedef Documentation

Definition at line 152 of file CFCache.h.

Definition at line 150 of file CFCache.h.

Definition at line 151 of file CFCache.h.

Constructor & Destructor Documentation

casa::refim::CFCache::CFCache ( const char *  cfDir = "CF")
inline

Definition at line 153 of file CFCache.h.

casa::refim::CFCache::~CFCache ( )

Member Function Documentation

casacore::Int casa::refim::CFCache::addToMemCache ( CFStoreCacheType cfCache,
casacore::Float  pa,
CFType cf,
casacore::CoordinateSystem coords,
casacore::Vector< casacore::Int > &  xConvSupport,
casacore::Vector< casacore::Int > &  yConvSupport,
casacore::Float  convSampling 
)
private

Internal method to add the given convolution function to the memory cache.

casacore::Bool casa::refim::CFCache::avgPBReady ( const casacore::String qualifier = casacore::String(""))
inline

Definition at line 289 of file CFCache.h.

void casa::refim::CFCache::cacheConvFunction ( CFStore cfs,
casacore::String  nameQualifier = "",
casacore::Bool  savePA = true 
)
inline

Methods to cache the convolution function.

Top level method interfacing with the CFStore object

Definition at line 200 of file CFCache.h.

References casa::refim::CFStore::pa.

void casa::refim::CFCache::cacheConvFunction ( const casacore::Quantity  pa,
CFStore cfs,
casacore::String  nameQualifier = "",
casacore::Bool  savePA = true 
)
inline


One level lower - the Parallactic angle can be separately provided.

Definition at line 206 of file CFCache.h.

References casacore::Quantum< Qtype >::getValue().

void casa::refim::CFCache::cacheConvFunction ( const casacore::Float  pa,
CFStore cfs,
casacore::String  nameQualifier = "",
casacore::Bool  savePA = true 
)


The Parallactic angle as a floating point number in radians.

casacore::Int casa::refim::CFCache::cacheConvFunction ( casacore::Int  which,
const casacore::Float pa,
CFType cf,
casacore::CoordinateSystem coords,
casacore::CoordinateSystem ftcoords,
casacore::Int convSize,
casacore::Vector< casacore::Int > &  xConvSupport,
casacore::Vector< casacore::Int > &  yConvSupport,
casacore::Float  convSampling,
casacore::String  nameQualifier = "",
casacore::Bool  savePA = true 
)


Lowest level - all information about CFStore is explicitly provided as basic types

void casa::refim::CFCache::fillCFListFromDisk ( const casacore::Vector< casacore::String > &  fileNames,
const casacore::String CFCDir,
CFStoreCacheType2 memStore,
casacore::Bool  showInfo,
casacore::Float  selectPAVal,
casacore::Float  dPA,
const casacore::Int  verbose = 1 
)
private
void casa::refim::CFCache::fillCFSFromDisk ( const casacore::Directory  dirObj,
const casacore::String pattern,
CFStoreCacheType2 memStore,
casacore::Bool  showInfo = false,
casacore::Float  selectPAVal = 400.0,
casacore::Float  dPA = -1.0,
const casacore::Int  verbose = 1 
)
private
void casa::refim::CFCache::flush ( )

Methods to write the auxillary information from the memory cache to the disk cache.

Without this call, the disk cache might not be complete. It is safe to call this method at anytime during the life of this object.

void casa::refim::CFCache::flush ( casacore::ImageInterface< casacore::Float > &  avgPB,
casacore::String  qualifier = casacore::String("") 
)
casacore::String casa::refim::CFCache::getCacheDir ( CFCDirType  dirType = USERDIR)
inline

Definition at line 166 of file CFCache.h.

casacore::TableRecord casa::refim::CFCache::getCFParams ( const casacore::String fileName,
casacore::Array< casacore::Complex > &  pixelBuffer,
casacore::CoordinateSystem coordSys,
casacore::Double sampling,
casacore::Double paVal,
casacore::Int xSupport,
casacore::Int ySupport,
casacore::Double fVal,
casacore::Double wVal,
casacore::Int mVal,
casacore::Double conjFreq,
casacore::Int conjPoln,
casacore::Bool  loadPixels = true 
)
CFStoreCacheType& casa::refim::CFCache::getMEMCacheObj ( const casacore::String nameQualifier)
private
casacore::String casa::refim::CFCache::getWtImagePrefix ( )
inline

Definition at line 169 of file CFCache.h.

void casa::refim::CFCache::initCache ( )

Method to initialize the internal memory cache.

void casa::refim::CFCache::initCache2 ( casacore::Bool  verbose = false,
casacore::Float  selectedPA = 400.0,
casacore::Float  dPA = -1.0 
)
void casa::refim::CFCache::initCacheFromList2 ( const casacore::String path,
const casacore::Vector< casacore::String > &  cfFileNames,
const casacore::Vector< casacore::String > &  cfWtFileNames,
casacore::Float  selectedPA,
casacore::Float  dPA,
const casacore::Int  verbose = 1 
)
void casa::refim::CFCache::initPolMaps ( PolMapType polMap,
PolMapType conjPolMap 
)
casacore::Bool casa::refim::CFCache::isLazyFillOn ( )
inline

Definition at line 172 of file CFCache.h.

casacore::Int casa::refim::CFCache::loadAvgPB ( casacore::ImageInterface< casacore::Float > &  avgPB,
casacore::String  qualifier = casacore::String("") 
)
casacore::Int casa::refim::CFCache::loadAvgPB ( casacore::CountedPtr< casacore::ImageInterface< casacore::Float > > &  avgPB,
casacore::String  qualifier = casacore::String("") 
)
inline

Definition at line 283 of file CFCache.h.

casacore::Int casa::refim::CFCache::loadFromDisk ( casacore::Int  where,
casacore::Float  pa,
casacore::Float  dPA,
casacore::Int  Nx,
CFStoreCacheType convFuncCache,
CFStore cfs,
casacore::String  nameQualifier = "" 
)

Lower level method to load a convolution function from the disk.

casacore::Int casa::refim::CFCache::loadWtImage ( casacore::ImageInterface< casacore::Float > &  avgPB,
casacore::String  qualifier 
)

loadAvgPB calls the method below if WtImgPrefix was set.

casacore::Int casa::refim::CFCache::locateConvFunction ( CFStore cfs,
CFStore cftws,
const casacore::Int  Nw,
const casacore::Quantity  pa,
const casacore::Quantity  dPA,
const casacore::Int  mosXPos = 0,
const casacore::Int  mosYPos = 0 
)
inline

Method to locate a convolution function for the given w-term index and PA value.

This is the top level function that must be used by the clients. This uses searchConvFunction() and loadFromDisk() methods and the private methods to return a convolution function.

Returns CFDefs::NOTCACHED if the convolution function was not found in the cache, CFDefs::MEMCACHE or CFDefs::DISKCACHE if the function was found in memory or disk cache respectively.

Definition at line 246 of file CFCache.h.

References casacore::Quantum< Qtype >::getValue().

casacore::Int casa::refim::CFCache::locateConvFunction ( CFStore cfs,
const casacore::Int  Nw,
const casacore::Quantity  pa,
const casacore::Quantity  dPA,
const casacore::String nameQualifier = "",
const casacore::Int  mosXPos = 0,
const casacore::Int  mosYPos = 0 
)
inline

Definition at line 251 of file CFCache.h.

References casacore::Quantum< Qtype >::getValue().

casacore::Int casa::refim::CFCache::locateConvFunction ( CFStore cfs,
CFStore cfwts,
const casacore::Int  Nw,
const casacore::Float  pa,
const casacore::Float  dPA,
const casacore::Int  mosXPos = 0,
const casacore::Int  mosYPos = 0 
)
casacore::Int casa::refim::CFCache::locateConvFunction ( CFStore cfs,
const casacore::Int  Nw,
const casacore::Float  pa,
const casacore::Float  dPA,
const casacore::String nameQualifier = "",
const casacore::Int  mosXPos = 0,
const casacore::Int  mosYPos = 0 
)
void casa::refim::CFCache::makeFTCoordSys ( const casacore::CoordinateSystem coords,
const casacore::Int convSize,
const casacore::Vector< casacore::Double > &  ftRef,
casacore::CoordinateSystem ftCoords 
)
private

Internal method to convert the direction co-ordinates of the given casacore::CoordinateSystem to its Fourier conjuguate co-ordinates.

CFCache& casa::refim::CFCache::operator= ( const CFCache other)
casacore::Bool casa::refim::CFCache::OTODone ( )
inline

Definition at line 184 of file CFCache.h.

casacore::Bool casa::refim::CFCache::searchConvFunction ( casacore::Int which,
const casacore::Quantity  pa,
const casacore::Quantity  dPA 
)
inline


Methods to sarch for a convolution function in the caches (disk or memory) for the give Parallactic Angle value.

Definition at line 225 of file CFCache.h.

References casacore::Quantum< Qtype >::getValue().

casacore::Bool casa::refim::CFCache::searchConvFunction ( casacore::Int which,
const casacore::Float  pa,
const casacore::Float  dPA 
)
void casa::refim::CFCache::setCacheDir ( const char *  dir)
inline

Method to set the disk cache directory name.

Definition at line 165 of file CFCache.h.

void casa::refim::CFCache::setLazyFill ( const casacore::Bool val)
void casa::refim::CFCache::setPAChangeDetector ( const ParAngleChangeDetector paCD)
inline

Method to set the class to caluclate the differential Parallactic Angle.

The ParAngleChangeDetector also holds the delta PA value (user defined).

Definition at line 194 of file CFCache.h.

void casa::refim::CFCache::setWtImagePrefix ( const char *  prefix)
inline

Definition at line 168 of file CFCache.h.

casacore::Long casa::refim::CFCache::size ( )

Compute the size of the memory cache in bytes.

void casa::refim::CFCache::summarize ( CFStoreCacheType2 memCache,
const casacore::String message,
const casacore::Bool  cfsInfo = true 
)

Member Data Documentation

casacore::String casa::refim::CFCache::aux
private

Definition at line 304 of file CFCache.h.

casacore::Bool casa::refim::CFCache::avgPBReady_p
private

Definition at line 334 of file CFCache.h.

casacore::String casa::refim::CFCache::avgPBReadyQualifier_p
private

Definition at line 335 of file CFCache.h.

CFCacheTableType casa::refim::CFCache::cfCacheTable_p
private

Definition at line 298 of file CFCache.h.

casacore::String casa::refim::CFCache::cfPrefix
private

Definition at line 304 of file CFCache.h.

casacore::String casa::refim::CFCache::Dir
private

Definition at line 304 of file CFCache.h.

casacore::Matrix<casacore::Float> casa::refim::CFCache::key2IndexMap
private

Definition at line 303 of file CFCache.h.

casacore::Bool casa::refim::CFCache::loadPixBuf_p
private

Definition at line 336 of file CFCache.h.

CFStoreCacheType2 casa::refim::CFCache::memCache2_p

Definition at line 294 of file CFCache.h.

CFStoreCacheType casa::refim::CFCache::memCache_p
private

Definition at line 297 of file CFCache.h.

CFStoreCacheType2 casa::refim::CFCache::memCacheWt2_p

Definition at line 294 of file CFCache.h.

CFStoreCacheType casa::refim::CFCache::memCacheWt_p
private

Definition at line 297 of file CFCache.h.

casacore::Bool casa::refim::CFCache::OTODone_p
private

Definition at line 336 of file CFCache.h.

ParAngleChangeDetector casa::refim::CFCache::paCD_p
private

Definition at line 305 of file CFCache.h.

casacore::Vector<casacore::Float> casa::refim::CFCache::paList
private

Definition at line 301 of file CFCache.h.

std::vector<casacore::Float> casa::refim::CFCache::paList_p
private

Definition at line 302 of file CFCache.h.

casacore::Vector<casacore::Float> casa::refim::CFCache::Sampling
private

Definition at line 301 of file CFCache.h.

casacore::String casa::refim::CFCache::WtImagePrefix
private

Definition at line 304 of file CFCache.h.

casacore::Matrix<casacore::Int> casa::refim::CFCache::XSup
private

Definition at line 300 of file CFCache.h.

casacore::Matrix<casacore::Int> casa::refim::CFCache::YSup
private

Definition at line 300 of file CFCache.h.


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