casa
$Rev:20696$
|
#include <CFCache.h>
Public Types | |
typedef Vector< CFStore > | CFStoreCacheType |
typedef 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. | |
String | getCacheDir () |
void | initCache () |
Method to initialize the internal memory cache. | |
void | initCache2 () |
Long | size () |
Compute the size of the memory cache in bytes. | |
void | setPAChangeDetector (const ParAngleChangeDetector &paCD) |
Method to set the class to caluclate the differential Parallactic Angle. | |
void | cacheConvFunction (CFStore &cfs, String nameQualifier="", Bool savePA=True) |
Methods to cache the convolution function. | |
void | cacheConvFunction (const Quantity pa, CFStore &cfs, String nameQualifier="", Bool savePA=True) |
One level lower - the Parallactic angle can be separately provided. | |
void | cacheConvFunction (const Float pa, CFStore &cfs, String nameQualifier="", Bool savePA=True) |
The Parallactic angle as a floating point number in radians. | |
Int | cacheConvFunction (Int which, const Float &pa, CFType &cf, CoordinateSystem &coords, CoordinateSystem &ftcoords, Int &convSize, Vector< Int > &xConvSupport, Vector< Int > &yConvSupport, Float convSampling, String nameQualifier="", Bool savePA=True) |
Lowest level - all information about CFStore is explicitly provided as basic types | |
Bool | searchConvFunction (Int &which, const Quantity pa, const Quantity dPA) |
Methods to sarch for a convolution function in the caches (disk or memory) for the give Parallactic Angle value. | |
Bool | searchConvFunction (Int &which, const Float pa, const Float dPA) |
Int | loadFromDisk (Int where, Float pa, Float dPA, Int Nx, CFStoreCacheType &convFuncCache, CFStore &cfs, String nameQualifier="") |
Lower level method to load a convolution function from the disk. | |
Int | locateConvFunction (CFStore &cfs, CFStore &cftws, const Int Nw, const Quantity pa, const Quantity dPA, const Int mosXPos=0, const Int mosYPos=0) |
Method to locate a convolution function for the given w-term index and PA value. | |
Int | locateConvFunction (CFStore &cfs, const Int Nw, const Quantity pa, const Quantity dPA, const String &nameQualifier="", const Int mosXPos=0, const Int mosYPos=0) |
Int | locateConvFunction (CFStore &cfs, CFStore &cfwts, const Int Nw, const Float pa, const Float dPA, const Int mosXPos=0, const Int mosYPos=0) |
Int | locateConvFunction (CFStore &cfs, const Int Nw, const Float pa, const Float dPA, const String &nameQualifier="", const Int mosXPos=0, const Int mosYPos=0) |
void | flush () |
Methods to write the auxillary information from the memory cache to the disk cache. | |
void | flush (ImageInterface< Float > &avgPB, String qualifier=String("")) |
Int | loadAvgPB (ImageInterface< Float > &avgPB, String qualifier=String("")) |
Int | loadAvgPB (CountedPtr< ImageInterface< Float > > &avgPB, String qualifier=String("")) |
Bool | avgPBReady (const String &qualifier=String("")) |
Private Member Functions | |
void | makeFTCoordSys (const CoordinateSystem &coords, const Int &convSize, const Vector< Double > &ftRef, CoordinateSystem &ftCoords) |
Internal method to convert the direction co-ordinates of the given CoordinateSystem to its Fourier conjuguate co-ordinates. | |
Int | addToMemCache (CFStoreCacheType &cfCache, Float pa, CFType *cf, CoordinateSystem &coords, Vector< Int > &xConvSupport, Vector< Int > &yConvSupport, Float convSampling) |
Internal method to add the given convolution function to the memory cache. | |
CFStoreCacheType & | getMEMCacheObj (const String &nameQualifier) |
Private Attributes | |
CFStoreCacheType | memCache_p |
CFStoreCacheType | memCacheWt_p |
CFCacheTableType | cfCacheTable_p |
Matrix< Int > | XSup |
Matrix< Int > | YSup |
Vector< Float > | paList |
Vector< Float > | Sampling |
vector< Float > | paList_p |
Matrix< Float > | key2IndexMap |
String | Dir |
String | cfPrefix |
String | aux |
ParAngleChangeDetector | paCD_p |
Bool | avgPBReady_p |
String | avgPBReadyQualifier_p |
typedef vector<CFCacheTable> casa::CFCache::CFCacheTableType |
typedef Vector< CFStore > casa::CFCache::CFStoreCacheType |
casa::CFCache::CFCache | ( | const char * | cfDir = "CF" | ) | [inline] |
Int casa::CFCache::addToMemCache | ( | CFStoreCacheType & | cfCache, |
Float | pa, | ||
CFType * | cf, | ||
CoordinateSystem & | coords, | ||
Vector< Int > & | xConvSupport, | ||
Vector< Int > & | yConvSupport, | ||
Float | convSampling | ||
) | [private] |
Internal method to add the given convolution function to the memory cache.
Bool casa::CFCache::avgPBReady | ( | const String & | qualifier = String("") | ) | [inline] |
void casa::CFCache::cacheConvFunction | ( | CFStore & | cfs, |
String | nameQualifier = "" , |
||
Bool | savePA = True |
||
) | [inline] |
Methods to cache the convolution function.
Definition at line 178 of file CFCache.h.
References cacheConvFunction(), and casa::CFStore::pa.
Referenced by cacheConvFunction().
void casa::CFCache::cacheConvFunction | ( | const Quantity | pa, |
CFStore & | cfs, | ||
String | nameQualifier = "" , |
||
Bool | savePA = True |
||
) | [inline] |
Definition at line 184 of file CFCache.h.
References cacheConvFunction(), and casa::Quantum< Qtype >::getValue().
Referenced by cacheConvFunction().
void casa::CFCache::cacheConvFunction | ( | const Float | pa, |
CFStore & | cfs, | ||
String | nameQualifier = "" , |
||
Bool | savePA = True |
||
) |
Int casa::CFCache::cacheConvFunction | ( | Int | which, |
const Float & | pa, | ||
CFType & | cf, | ||
CoordinateSystem & | coords, | ||
CoordinateSystem & | ftcoords, | ||
Int & | convSize, | ||
Vector< Int > & | xConvSupport, | ||
Vector< Int > & | yConvSupport, | ||
Float | convSampling, | ||
String | nameQualifier = "" , |
||
Bool | savePA = True |
||
) |
void casa::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::CFCache::flush | ( | ImageInterface< Float > & | avgPB, |
String | qualifier = String("") |
||
) |
String casa::CFCache::getCacheDir | ( | ) | [inline] |
CFStoreCacheType& casa::CFCache::getMEMCacheObj | ( | const String & | nameQualifier | ) | [private] |
void casa::CFCache::initCache | ( | ) |
Method to initialize the internal memory cache.
void casa::CFCache::initCache2 | ( | ) |
Int casa::CFCache::loadAvgPB | ( | ImageInterface< Float > & | avgPB, |
String | qualifier = String("") |
||
) |
Int casa::CFCache::loadAvgPB | ( | CountedPtr< ImageInterface< Float > > & | avgPB, |
String | qualifier = String("") |
||
) | [inline] |
Int casa::CFCache::loadFromDisk | ( | Int | where, |
Float | pa, | ||
Float | dPA, | ||
Int | Nx, | ||
CFStoreCacheType & | convFuncCache, | ||
CFStore & | cfs, | ||
String | nameQualifier = "" |
||
) |
Lower level method to load a convolution function from the disk.
Int casa::CFCache::locateConvFunction | ( | CFStore & | cfs, |
CFStore & | cftws, | ||
const Int | Nw, | ||
const Quantity | pa, | ||
const Quantity | dPA, | ||
const Int | mosXPos = 0 , |
||
const 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 224 of file CFCache.h.
References casa::Quantum< Qtype >::getValue(), and locateConvFunction().
Referenced by locateConvFunction().
Int casa::CFCache::locateConvFunction | ( | CFStore & | cfs, |
const Int | Nw, | ||
const Quantity | pa, | ||
const Quantity | dPA, | ||
const String & | nameQualifier = "" , |
||
const Int | mosXPos = 0 , |
||
const Int | mosYPos = 0 |
||
) | [inline] |
Definition at line 229 of file CFCache.h.
References casa::Quantum< Qtype >::getValue(), and locateConvFunction().
Referenced by locateConvFunction().
Int casa::CFCache::locateConvFunction | ( | CFStore & | cfs, |
CFStore & | cfwts, | ||
const Int | Nw, | ||
const Float | pa, | ||
const Float | dPA, | ||
const Int | mosXPos = 0 , |
||
const Int | mosYPos = 0 |
||
) |
Int casa::CFCache::locateConvFunction | ( | CFStore & | cfs, |
const Int | Nw, | ||
const Float | pa, | ||
const Float | dPA, | ||
const String & | nameQualifier = "" , |
||
const Int | mosXPos = 0 , |
||
const Int | mosYPos = 0 |
||
) |
void casa::CFCache::makeFTCoordSys | ( | const CoordinateSystem & | coords, |
const Int & | convSize, | ||
const Vector< Double > & | ftRef, | ||
CoordinateSystem & | ftCoords | ||
) | [private] |
Internal method to convert the direction co-ordinates of the given CoordinateSystem to its Fourier conjuguate co-ordinates.
Bool casa::CFCache::searchConvFunction | ( | Int & | which, |
const Quantity | pa, | ||
const Quantity | dPA | ||
) | [inline] |
Definition at line 203 of file CFCache.h.
References casa::Quantum< Qtype >::getValue(), and searchConvFunction().
Referenced by searchConvFunction().
Bool casa::CFCache::searchConvFunction | ( | Int & | which, |
const Float | pa, | ||
const Float | dPA | ||
) |
void casa::CFCache::setCacheDir | ( | const char * | dir | ) | [inline] |
void casa::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).
Compute the size of the memory cache in bytes.
String casa::CFCache::aux [private] |
Bool casa::CFCache::avgPBReady_p [private] |
String casa::CFCache::avgPBReadyQualifier_p [private] |
String casa::CFCache::cfPrefix [private] |
String casa::CFCache::Dir [private] |
Matrix<Float> casa::CFCache::key2IndexMap [private] |
CFStoreCacheType casa::CFCache::memCache_p [private] |
CFStoreCacheType casa::CFCache::memCacheWt_p [private] |
ParAngleChangeDetector casa::CFCache::paCD_p [private] |
Vector<Float> casa::CFCache::paList [private] |
vector<Float> casa::CFCache::paList_p [private] |
Vector<Float> casa::CFCache::Sampling [private] |
Matrix<Int> casa::CFCache::XSup [private] |
Matrix<Int> casa::CFCache::YSup [private] |