casa::refim::CFCache Class Reference

---------------------------------------------------------------------- More...

#include <CFCache.h>

List of all members.

Public Types

typedef Vector< CFStoreCFStoreCacheType
typedef Vector< CFStore2CFStoreCacheType2
typedef 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.
String getCacheDir ()
void setWtImagePrefix (const char *prefix)
String getWtImagePrefix ()
void initCache ()
 Method to initialize the internal memory cache.
void initCache2 (Bool verbose=False, Float selectedPA=400.0, Float dPA=-1.0)
void initCacheFromList2 (const String &path, const Vector< String > &cfFileNames, const Vector< String > &cfWtFileNames, Float selectedPA, Float dPA, const Int verbose=1)
void initPolMaps (PolMapType &polMap, PolMapType &conjPolMap)
Bool OTODone ()
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)
TableRecord getCFParams (const String &fileName, Array< Complex > &pixelBuffer, CoordinateSystem &coordSys, Double &sampling, Double &paVal, Int &xSupport, Int &ySupport, Double &fVal, Double &wVal, Int &mVal, Double &conjFreq, Int &conjPoln, Bool loadPixels=True)
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(""))
Int loadWtImage (ImageInterface< Float > &avgPB, String qualifier)
 loadAvgPB calls the method below if WtImgPrefix was set.
Bool avgPBReady (const String &qualifier=String(""))
void summarize (CFStoreCacheType2 &memCache, const String &message, const Bool cfsInfo=True)

Public Attributes

CFStoreCacheType2 memCache2_p
CFStoreCacheType2 memCacheWt2_p

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.
CFStoreCacheTypegetMEMCacheObj (const String &nameQualifier)
void fillCFSFromDisk (const Directory dirObj, const String &pattern, CFStoreCacheType2 &memStore, Bool showInfo=False, Float selectPAVal=400.0, Float dPA=-1.0, const Int verbose=1)
void fillCFListFromDisk (const Vector< String > &fileNames, const String &CFCDir, CFStoreCacheType2 &memStore, Bool showInfo, Float selectPAVal, Float dPA, const Int verbose=1)

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 WtImagePrefix
String cfPrefix
String aux
ParAngleChangeDetector paCD_p
Bool avgPBReady_p
String avgPBReadyQualifier_p
Bool OTODone_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

Int casa::refim::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::refim::CFCache::avgPBReady ( const String &  qualifier = String("")  )  [inline]

Definition at line 286 of file CFCache.h.

References avgPBReady_p, and avgPBReadyQualifier_p.

Int casa::refim::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 
)

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

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

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

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

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

Definition at line 203 of file CFCache.h.

References cacheConvFunction().

Referenced by cacheConvFunction().

void casa::refim::CFCache::cacheConvFunction ( CFStore cfs,
String  nameQualifier = "",
Bool  savePA = True 
) [inline]

Methods to cache the convolution function.

Top level method interfacing with the CFStore object -------------------------------------------------------------------

Definition at line 197 of file CFCache.h.

References cacheConvFunction(), and casa::refim::CFStore::pa.

Referenced by cacheConvFunction().

void casa::refim::CFCache::fillCFListFromDisk ( const Vector< String > &  fileNames,
const String &  CFCDir,
CFStoreCacheType2 memStore,
Bool  showInfo,
Float  selectPAVal,
Float  dPA,
const Int  verbose = 1 
) [private]
void casa::refim::CFCache::fillCFSFromDisk ( const Directory  dirObj,
const String &  pattern,
CFStoreCacheType2 memStore,
Bool  showInfo = False,
Float  selectPAVal = 400.0,
Float  dPA = -1.0,
const Int  verbose = 1 
) [private]
void casa::refim::CFCache::flush ( ImageInterface< Float > &  avgPB,
String  qualifier = String("") 
)
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.

String casa::refim::CFCache::getCacheDir (  )  [inline]

Definition at line 166 of file CFCache.h.

References Dir.

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

Definition at line 169 of file CFCache.h.

References WtImagePrefix.

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

Method to initialize the internal memory cache.

void casa::refim::CFCache::initCache2 ( Bool  verbose = False,
Float  selectedPA = 400.0,
Float  dPA = -1.0 
)
void casa::refim::CFCache::initCacheFromList2 ( const String &  path,
const Vector< String > &  cfFileNames,
const Vector< String > &  cfWtFileNames,
Float  selectedPA,
Float  dPA,
const Int  verbose = 1 
)
void casa::refim::CFCache::initPolMaps ( PolMapType &  polMap,
PolMapType &  conjPolMap 
)
Int casa::refim::CFCache::loadAvgPB ( CountedPtr< ImageInterface< Float > > &  avgPB,
String  qualifier = String("") 
) [inline]

Definition at line 280 of file CFCache.h.

References loadAvgPB().

Referenced by loadAvgPB().

Int casa::refim::CFCache::loadAvgPB ( ImageInterface< Float > &  avgPB,
String  qualifier = String("") 
)
Int casa::refim::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::refim::CFCache::loadWtImage ( ImageInterface< Float > &  avgPB,
String  qualifier 
)

loadAvgPB calls the method below if WtImgPrefix was set.

Int casa::refim::CFCache::locateConvFunction ( CFStore cfs,
const Int  Nw,
const Float  pa,
const Float  dPA,
const String &  nameQualifier = "",
const Int  mosXPos = 0,
const Int  mosYPos = 0 
)
Int casa::refim::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::refim::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 248 of file CFCache.h.

References locateConvFunction().

Referenced by locateConvFunction().

Int casa::refim::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 243 of file CFCache.h.

References locateConvFunction().

Referenced by locateConvFunction().

void casa::refim::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.

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

Definition at line 181 of file CFCache.h.

References OTODone_p.

Bool casa::refim::CFCache::searchConvFunction ( Int &  which,
const Float  pa,
const Float  dPA 
)
Bool casa::refim::CFCache::searchConvFunction ( Int &  which,
const Quantity  pa,
const 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 222 of file CFCache.h.

References searchConvFunction().

Referenced by searchConvFunction().

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.

References Dir, and String.

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 191 of file CFCache.h.

References paCD_p.

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

Definition at line 168 of file CFCache.h.

References WtImagePrefix.

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

Compute the size of the memory cache in bytes.

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

Member Data Documentation

String casa::refim::CFCache::aux [private]

Definition at line 301 of file CFCache.h.

Definition at line 331 of file CFCache.h.

Referenced by avgPBReady().

Definition at line 332 of file CFCache.h.

Referenced by avgPBReady().

Definition at line 295 of file CFCache.h.

Definition at line 301 of file CFCache.h.

String casa::refim::CFCache::Dir [private]

Definition at line 301 of file CFCache.h.

Referenced by getCacheDir(), and setCacheDir().

Matrix<Float> casa::refim::CFCache::key2IndexMap [private]

Definition at line 300 of file CFCache.h.

Definition at line 291 of file CFCache.h.

Definition at line 294 of file CFCache.h.

Definition at line 291 of file CFCache.h.

Definition at line 294 of file CFCache.h.

Definition at line 333 of file CFCache.h.

Referenced by OTODone().

Definition at line 302 of file CFCache.h.

Referenced by setPAChangeDetector().

Vector<Float> casa::refim::CFCache::paList [private]

Definition at line 298 of file CFCache.h.

vector<Float> casa::refim::CFCache::paList_p [private]

Definition at line 299 of file CFCache.h.

Vector<Float> casa::refim::CFCache::Sampling [private]

Definition at line 298 of file CFCache.h.

Definition at line 301 of file CFCache.h.

Referenced by getWtImagePrefix(), and setWtImagePrefix().

Matrix<Int> casa::refim::CFCache::XSup [private]

Definition at line 297 of file CFCache.h.

Matrix<Int> casa::refim::CFCache::YSup [private]

Definition at line 297 of file CFCache.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1