casa
5.7.0-16
|
#include <CFCache.h>
Public Types | |
typedef casacore::Vector< CFStore > | CFStoreCacheType |
typedef casacore::Vector < CFStore2 > | CFStoreCacheType2 |
typedef std::vector< CFCacheTable > | CFCacheTableType |
Public Member Functions | |
CFCache (const char *cfDir="CF") | |
CFCache & | operator= (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... | |
CFStoreCacheType & | getMEMCacheObj (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) |
typedef std::vector<CFCacheTable> casa::refim::CFCache::CFCacheTableType |
|
inline |
casa::refim::CFCache::~CFCache | ( | ) |
|
private |
Internal method to add the given convolution function to the memory cache.
|
inline |
|
inline |
Methods to cache the convolution function.
Definition at line 200 of file CFCache.h.
References casa::refim::CFStore::pa.
|
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
|
private |
|
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("") |
||
) |
|
inline |
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 |
||
) |
|
private |
|
inline |
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 | ||
) |
|
inline |
casacore::Int casa::refim::CFCache::loadAvgPB | ( | casacore::ImageInterface< casacore::Float > & | avgPB, |
casacore::String | qualifier = casacore::String("") |
||
) |
|
inline |
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.
|
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().
|
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 |
||
) |
|
private |
Internal method to convert the direction co-ordinates of the given casacore::CoordinateSystem to its Fourier conjuguate co-ordinates.
|
inline |
|
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 | ||
) |
|
inline |
void casa::refim::CFCache::setLazyFill | ( | const casacore::Bool & | val | ) |
|
inline |
Method to set the class to caluclate the differential Parallactic Angle.
The ParAngleChangeDetector also holds the delta PA value (user defined).
|
inline |
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 |
||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
CFStoreCacheType2 casa::refim::CFCache::memCache2_p |
|
private |
CFStoreCacheType2 casa::refim::CFCache::memCacheWt2_p |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |