casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
casa::CFBuffer Class Reference

#include <CFBuffer.h>

List of all members.

Public Member Functions

 CFBuffer ()
 

========================= Administrative Parts ==========================


 CFBuffer (Int maxXSup, Int maxYSup)
 ~CFBuffer ()
CountedPtr< CFBufferclone ()
void allocCells (const Cube< CountedPtr< CFCell > > &cells)
void setParams (const CFBuffer &other)
Int nChan ()
 

============================= Functional Parts ============================


Int nW ()
Int nMuellerElements ()
IPosition shape ()
Vector< DoublegetFreqList ()
Vector< DoublegetWList ()
CFCellgetCFCell (const Double &freqVal, const Double &wValue, const Int &muellerElement)
CountedPtr< CFCell > & getCFCellPtr (const Double &freqVal, const Double &wValue, const Int &muellerElement)
 muellerElement: (i,j) of the Mueller Matrix
CFCellgetCFCell (const Int &i, const Int &j, const Int &k)
CountedPtr< CFCell > & getCFCellPtr (const Int &i, const Int &j, const Int &k)
Array< TT > & getCF (const Double &freqVal, const Double &wValue, const Int &muellerElement)
 =========================================================================
CountedPtr< Array< TT > > & getCFPtr (const Double &freqVal, const Double &wValue, const Int &muellerElement)
 muellerElement: (i,j) of the Mueller Matrix
Array< TT > & getCF (const Int &i, const Int &j, const Int &k)
CountedPtr< Array< TT > > & getCFPtr (const Int &i, const Int &j, const Int &k)
void getParams (CoordinateSystem &cs, Float &sampling, Int &xSupport, Int &ySupport, const Double &freqVal, const Double &wValue, const Int &muellerElement)
 Get the parameters of a the CFs indexed by values.
void getParams (CoordinateSystem &cs, Float &sampling, Int &xSupport, Int &ySupport, const Int &i, const Int &j, const Int &k)
 
Get CF by directly indexing in the list of CFs (data vector)
void getParams (Double &freqVal, Float &sampling, Int &xSupport, Int &ySupport, const Int &iFreq, const Int &iW, const Int &iPol)
void getCoordList (Vector< Double > &freqValues, Vector< Double > &wValues, PolMapType &muellerElementsIndex, PolMapType &muellerElements, PolMapType &conjMuellerElementsIndex, PolMapType &conjMuellerElements, Double &fIncr, Double &wIncr)
Int nearestNdx (const Double &val, const Vector< Double > &valList, const Double &incr)
Int nearestFreqNdx (const Double &freqVal)
Int nearestWNdx (const Double &wVal)
Double nearest (Bool &found, const Double &val, const Vector< Double > &valList, const Double &incr)
Double nearestFreq (Bool &found, const Double &freqVal)
Double nearestWVal (Bool &found, const Double &wVal)
void makeCFBufferMap (const Vector< Double > &freqVals, const Vector< Double > &wValues, const MuellerMatrixType &muellerElements)
 

void addCF (Array< TT > *, CoordinateSystem &, Float &, Int &, Int &, Double &, Double &, Int &)
 

void resize (const IPosition &size)
 

void resize (const Double &wIncr, const Double &freqIncr, const Vector< Double > &wValues, const Vector< Double > &freqValues, const PolMapType &muellerElements, const PolMapType &muellerElementsIndex, const PolMapType &conjMuellerElements, const PolMapType &conjMuellerElementsIndex)
Int noOfMuellerElements (const PolMapType &muellerElements)
RigidVector< Int, 3 > setParams (const Int &i, const Int &j, const Int &ipx, const Int &ipy, CoordinateSystem &cs, Float &sampling, Int &xSupport, Int &ySupport, const Double &freqValue, const Double &wValue, const Int &muellerElement)
 
Set only the CF parameters.
void setPointingOffset (const Vector< Double > &offset)
Vector< DoublegetPointingOffset ()
void setParams (Int &nx, Int &ny, CoordinateSystem &cs, Float &sampling, Int &xSupport, Int &ySupport, const Double &freqVal, const Double &wValue, const Int &muellerElement)
 Also set the size of the CF in x and y.
RigidVector< Int, 3 > getIndex (const Double &freqVal, const Double &wValue, const Int &muellerElement)
void copyParams (const CFBuffer &other)
 

void show (const char *Mesg=NULL, ostream &os=cerr)
 

Bool null ()
 Returns True if the internal storage is not yet initialized.
Cube< CountedPtr< CFCell > > & getStorage ()
void makePersistent (const char *dir)
void initMaps (const VisBuffer &vb, const Matrix< Double > &freqSelection, const Double &imRefFreq)
Int nearestFreqNdx (const Int &spw, const Int &chan, const Bool conj=False)

Protected Attributes

Cube< CountedPtr< CFCell > > cfCells_p
 

============================= Protected Parts ============================


Vector< DoublewValues_p
Vector< DoublefreqValues_p
PolMapType muellerElements_p
PolMapType muellerElementsIndex_p
PolMapType conjMuellerElements_p
PolMapType conjMuellerElementsIndex_p
Double wValIncr_p
Double freqValIncr_p
MuellerMatrixType muellerMask_p
Int nPol_p
Int nChan_p
Int nW_p
Int maxXSupport_p
Int maxYSupport_p
Vector< DoublepointingOffset_p
Cube< IntcfHitsStats
Bool freqNdxMapsReady_p
Vector< Vector< Int > > freqNdxMap_p
Vector< Vector< Int > > conjFreqNdxMap_p

Detailed Description

Definition at line 103 of file CFBuffer.h.


Constructor & Destructor Documentation

========================= Administrative Parts ==========================

Definition at line 110 of file CFBuffer.h.

casa::CFBuffer::CFBuffer ( Int  maxXSup,
Int  maxYSup 
) [inline]

storage_p.resize(1,1,1); storage_p(0,0,0) = new Array<TT>(dataPtr); coordSys_p.resize(1,1,1); coordSys_p(0,0,0) = cs;

Definition at line 114 of file CFBuffer.h.

Definition at line 124 of file CFBuffer.h.


Member Function Documentation

void casa::CFBuffer::addCF ( Array< TT > *  ,
CoordinateSystem ,
Float ,
Int ,
Int ,
Double ,
Double ,
Int  
) [inline]


Add a Convolution Function with associated parameters.

Definition at line 253 of file CFBuffer.h.

void casa::CFBuffer::allocCells ( const Cube< CountedPtr< CFCell > > &  cells)
void casa::CFBuffer::copyParams ( const CFBuffer other) [inline]


Copy just the parameters from other to this.

coordSys_p = other.coordSys_p; sampling_p.assign(other.sampling_p); xSupport_p.assign(other.xSupport_p); ySupport_p.assign(other.ySupport_p);

Definition at line 298 of file CFBuffer.h.

References cfCells_p, maxXSupport_p, and maxYSupport_p.

Array<TT>& casa::CFBuffer::getCF ( const Double freqVal,
const Double wValue,
const Int muellerElement 
) [inline]

=========================================================================

Definition at line 163 of file CFBuffer.h.

Array<TT>& casa::CFBuffer::getCF ( const Int i,
const Int j,
const Int k 
) [inline]

Definition at line 172 of file CFBuffer.h.

CFCell& casa::CFBuffer::getCFCell ( const Double freqVal,
const Double wValue,
const Int muellerElement 
)
CFCell& casa::CFBuffer::getCFCell ( const Int i,
const Int j,
const Int k 
)
CountedPtr<CFCell>& casa::CFBuffer::getCFCellPtr ( const Double freqVal,
const Double wValue,
const Int muellerElement 
)

muellerElement: (i,j) of the Mueller Matrix

CountedPtr<CFCell >& casa::CFBuffer::getCFCellPtr ( const Int i,
const Int j,
const Int k 
)
CountedPtr<Array<TT> >& casa::CFBuffer::getCFPtr ( const Double freqVal,
const Double wValue,
const Int muellerElement 
) [inline]

muellerElement: (i,j) of the Mueller Matrix

Definition at line 168 of file CFBuffer.h.

CountedPtr<Array<TT> >& casa::CFBuffer::getCFPtr ( const Int i,
const Int j,
const Int k 
) [inline]

Definition at line 175 of file CFBuffer.h.

void casa::CFBuffer::getCoordList ( Vector< Double > &  freqValues,
Vector< Double > &  wValues,
PolMapType muellerElementsIndex,
PolMapType muellerElements,
PolMapType conjMuellerElementsIndex,
PolMapType conjMuellerElements,
Double fIncr,
Double wIncr 
) [inline]

Definition at line 211 of file CFBuffer.h.

References casa::Vector< T >::assign().

Definition at line 151 of file CFBuffer.h.

RigidVector<Int,3> casa::CFBuffer::getIndex ( const Double freqVal,
const Double wValue,
const Int muellerElement 
)
void casa::CFBuffer::getParams ( CoordinateSystem cs,
Float sampling,
Int xSupport,
Int ySupport,
const Double freqVal,
const Double wValue,
const Int muellerElement 
)

Get the parameters of a the CFs indexed by values.

The version which returns also the Coordinate System associated with the CFs are slow (CoordinateSystem::operator=() is surprisingly expensive!). So do not use this in tight loops. If it is required, use the version without the co-ordinate system below.

void casa::CFBuffer::getParams ( CoordinateSystem cs,
Float sampling,
Int xSupport,
Int ySupport,
const Int i,
const Int j,
const Int k 
) [inline]


Get CF by directly indexing in the list of CFs (data vector)

Definition at line 192 of file CFBuffer.h.

void casa::CFBuffer::getParams ( Double freqVal,
Float sampling,
Int xSupport,
Int ySupport,
const Int iFreq,
const Int iW,
const Int iPol 
) [inline]

Definition at line 201 of file CFBuffer.h.

Definition at line 284 of file CFBuffer.h.

Definition at line 317 of file CFBuffer.h.

Definition at line 152 of file CFBuffer.h.

void casa::CFBuffer::initMaps ( const VisBuffer vb,
const Matrix< Double > &  freqSelection,
const Double imRefFreq 
)
void casa::CFBuffer::makeCFBufferMap ( const Vector< Double > &  freqVals,
const Vector< Double > &  wValues,
const MuellerMatrixType muellerElements 
)


Generate a map for the given frequency and Mueller element list to the index in the internal list of CFs. This can be used in tight loops to get get direct access to the required CF.

void casa::CFBuffer::makePersistent ( const char *  dir)
Int casa::CFBuffer::nChan ( ) [inline]

============================= Functional Parts ============================

CFBuffer& operator=(const CFBuffer& other);

Get the single convolution function as an Array<T> for the supplied value of the frequency and the muellerElement. Mueller element is essentially the polarization product, but can be any of the of 16 elements of the outer product.


Definition at line 146 of file CFBuffer.h.

Double casa::CFBuffer::nearest ( Bool found,
const Double val,
const Vector< Double > &  valList,
const Double incr 
)
Double casa::CFBuffer::nearestFreq ( Bool found,
const Double freqVal 
) [inline]

Definition at line 234 of file CFBuffer.h.

Int casa::CFBuffer::nearestFreqNdx ( const Int spw,
const Int chan,
const Bool  conj = False 
) [inline]

Definition at line 322 of file CFBuffer.h.

References casa::conj().

Int casa::CFBuffer::nearestNdx ( const Double val,
const Vector< Double > &  valList,
const Double incr 
)
Int casa::CFBuffer::nearestWNdx ( const Double wVal) [inline]

return SynthesisUtils::nint(sqrt(wValIncr_p*abs(wVal)));

Definition at line 226 of file CFBuffer.h.

References casa::abs(), and casa::sqrt().

Double casa::CFBuffer::nearestWVal ( Bool found,
const Double wVal 
) [inline]

Definition at line 237 of file CFBuffer.h.

Definition at line 148 of file CFBuffer.h.

Int casa::CFBuffer::noOfMuellerElements ( const PolMapType muellerElements)
Bool casa::CFBuffer::null ( ) [inline]

Returns True if the internal storage is not yet initialized.

Definition at line 315 of file CFBuffer.h.

Int casa::CFBuffer::nW ( ) [inline]

Definition at line 147 of file CFBuffer.h.

void casa::CFBuffer::resize ( const IPosition size) [inline]


Definition at line 265 of file CFBuffer.h.

void casa::CFBuffer::resize ( const Double wIncr,
const Double freqIncr,
const Vector< Double > &  wValues,
const Vector< Double > &  freqValues,
const PolMapType muellerElements,
const PolMapType muellerElementsIndex,
const PolMapType conjMuellerElements,
const PolMapType conjMuellerElementsIndex 
)
void casa::CFBuffer::setParams ( const CFBuffer other)
RigidVector<Int, 3> casa::CFBuffer::setParams ( const Int i,
const Int j,
const Int ipx,
const Int ipy,
CoordinateSystem cs,
Float sampling,
Int xSupport,
Int ySupport,
const Double freqValue,
const Double wValue,
const Int muellerElement 
)


Set only the CF parameters.

Return to index of the CF that was set.

void casa::CFBuffer::setParams ( Int nx,
Int ny,
CoordinateSystem cs,
Float sampling,
Int xSupport,
Int ySupport,
const Double freqVal,
const Double wValue,
const Int muellerElement 
)

Also set the size of the CF in x and y.

void casa::CFBuffer::setPointingOffset ( const Vector< Double > &  offset) [inline]

Definition at line 282 of file CFBuffer.h.

Definition at line 149 of file CFBuffer.h.

void casa::CFBuffer::show ( const char *  Mesg = NULL,
ostream &  os = cerr 
)


Write the description of the storage on the supplied ostream. Used mostly for debugging, but might be useful for user feedback/logging.


Member Data Documentation

============================= Protected Parts ============================

The storage buffer for the pixel values in CFCell is Array<T> rather than Matrix<T> to accomodate rotationally symmetric CFs (like the Prolate Spheroidal) which can be held as a Vector of values.

Definition at line 338 of file CFBuffer.h.

Referenced by copyParams().

Definition at line 346 of file CFBuffer.h.

Definition at line 348 of file CFBuffer.h.

Definition at line 340 of file CFBuffer.h.

Definition at line 340 of file CFBuffer.h.

Definition at line 348 of file CFBuffer.h.

Definition at line 347 of file CFBuffer.h.

Definition at line 341 of file CFBuffer.h.

Definition at line 339 of file CFBuffer.h.

Definition at line 344 of file CFBuffer.h.

Referenced by copyParams().

Definition at line 344 of file CFBuffer.h.

Referenced by copyParams().

Definition at line 340 of file CFBuffer.h.

Definition at line 340 of file CFBuffer.h.

Definition at line 342 of file CFBuffer.h.

Definition at line 344 of file CFBuffer.h.

Definition at line 344 of file CFBuffer.h.

Definition at line 344 of file CFBuffer.h.

Definition at line 345 of file CFBuffer.h.

Definition at line 341 of file CFBuffer.h.

Definition at line 339 of file CFBuffer.h.


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