28 #ifndef SYNTHESIS_CFCACHE_H
29 #define SYNTHESIS_CFCACHE_H
53 using namespace CFDefs;
136 {freqList.resize(0); wList.resize(0); muellerList.resize(0); cfNameList.resize(0);}
138 std::vector<casacore::Double> freqList,
wList;
153 memCache2_p(), memCacheWt2_p(),memCache_p(), memCacheWt_p(),
154 cfCacheTable_p(), XSup(), YSup(), paList(),
155 paList_p(), key2IndexMap(),
156 Dir(
""), WtImagePrefix(
""), cfPrefix(cfDir), aux(
"aux.dat"), paCD_p(), avgPBReady_p(
False),
157 avgPBReadyQualifier_p(
""), OTODone_p(
False), loadPixBuf_p(
True)
170 void setLazyFill(
const Bool& val);
201 {cacheConvFunction(cfs.
pa, cfs,nameQualifier,savePA);}
207 {cacheConvFunction(pa.
getValue(
"rad"), cfs, nameQualifier,savePA);}
225 {
return searchConvFunction(which, pa.
getValue(
"rad"), dPA.
getValue(
"rad"));};
248 {
return locateConvFunction(cfs, cftws, Nw,pa.
getValue(
"rad"), dPA.
getValue(
"rad"),mosXPos,mosYPos);};
254 {
return locateConvFunction(cfs, Nw,pa.
getValue(
"rad"), dPA.
getValue(
"rad"),nameQualifier, mosXPos,mosYPos);};
289 {
return (avgPBReady_p && (avgPBReadyQualifier_p == qualifier));};
std::vector< casacore::Float > paList_p
std::vector< casacore::Double > wList
casacore::Matrix< casacore::Float > key2IndexMap
casacore::Vector< casacore::Float > Sampling
An object to manage the caches of pre-computed convolution functions on the disk and in the memory...
CFStoreCacheType memCacheWt_p
CFCacheTable & operator=(const CFCacheTable &other)
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 ...
casacore::Bool avgPBReady(const casacore::String &qualifier=casacore::String(""))
casacore::Matrix< casacore::Int > YSup
PtrHolder< T > & operator=(const PtrHolder< T > &other)
casacore::Double conjFreq(const casacore::Double &freq, const casacore::Double &refFreq)
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.
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.
Get information about, and manipulate directories.
TableExprNode pattern(const TableExprNode &node)
void makeFTCoordSys(const casacore::CoordinateSystem &coords, const casacore::Int &convSize, const casacore::Vector< casacore::Double > &ftRef, casacore::CoordinateSystem &ftCoords)
casacore::String avgPBReadyQualifier_p
casacore::String getWtImagePrefix()
casacore::TableRecord getCFParams(const casacore::String &dirName, 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, casacore::Bool loadMiscInfo=true)
void setCacheDir(const char *dir)
Method to set the disk cache directory name.
ParAngleChangeDetector paCD_p
casacore::String getCacheDir(CFCDirType dirType=USERDIR)
std::vector< casacore::Double > freqList
void setWtImagePrefix(const char *prefix)
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
Referenced counted pointer for constant data.
casacore::Vector< CFStore > CFStoreCacheType
casacore::Int loadAvgPB(casacore::CountedPtr< casacore::ImageInterface< casacore::Float > > &avgPB, casacore::String qualifier=casacore::String(""))
std::string path(const std::string &name)
casacore::Bool avgPBReady_p
std::vector< casacore::Int > muellerList
bool Bool
Define the standard types used by Casacore.
std::vector< CFCacheTable > CFCacheTableType
//////////////////////////////////////////////////////////////////////////
A hierarchical collection of named fields of various types.
casacore::Vector< CFStore2 > CFStoreCacheType2
std::vector< casacore::String > cfNameList
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)
CFStoreCacheType2 memCacheWt2_p
const Qtype & getValue() const
Get value of quantum in current units (i.e.
void cacheConvFunction(CFStore &cfs, casacore::String nameQualifier="", casacore::Bool savePA=true)
Methods to cache the convolution function.
void setPAChangeDetector(const ParAngleChangeDetector &paCD)
Method to set the class to caluclate the differential Parallactic Angle.
String: the storage and methods of handling collections of characters.
CFCacheTableType cfCacheTable_p
casacore::String WtImagePrefix
Interconvert pixel and world coordinates.
CFCache(const char *cfDir="CF")