casa
$Rev:20696$
|
#include <CFBuffer.h>
Public Member Functions | |
CFBuffer () | |
========================= Administrative Parts ========================== | |
CFBuffer (Int maxXSup, Int maxYSup) | |
~CFBuffer () | |
CountedPtr< CFBuffer > | clone () |
void | allocCells (const Cube< CountedPtr< CFCell > > &cells) |
void | setParams (const CFBuffer &other) |
Int | nChan () |
============================= Functional Parts ============================ | |
Int | nW () |
Int | nMuellerElements () |
IPosition | shape () |
Vector< Double > | getFreqList () |
Vector< Double > | getWList () |
CFCell & | getCFCell (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 | |
CFCell & | getCFCell (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< Double > | getPointingOffset () |
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< Double > | wValues_p |
Vector< Double > | freqValues_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< Double > | pointingOffset_p |
Cube< Int > | cfHitsStats |
Bool | freqNdxMapsReady_p |
Vector< Vector< Int > > | freqNdxMap_p |
Vector< Vector< Int > > | conjFreqNdxMap_p |
Definition at line 103 of file CFBuffer.h.
casa::CFBuffer::CFBuffer | ( | ) | [inline] |
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.
casa::CFBuffer::~CFBuffer | ( | ) | [inline] |
Definition at line 124 of file CFBuffer.h.
void casa::CFBuffer::addCF | ( | Array< TT > * | , |
CoordinateSystem & | , | ||
Float & | , | ||
Int & | , | ||
Int & | , | ||
Double & | , | ||
Double & | , | ||
Int & | |||
) | [inline] |
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.
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 | ||
) |
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().
Vector<Double> casa::CFBuffer::getFreqList | ( | ) | [inline] |
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] |
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.
Vector<Double> casa::CFBuffer::getPointingOffset | ( | ) | [inline] |
Definition at line 284 of file CFBuffer.h.
Cube<CountedPtr<CFCell> >& casa::CFBuffer::getStorage | ( | ) | [inline] |
Definition at line 317 of file CFBuffer.h.
Vector<Double> casa::CFBuffer::getWList | ( | ) | [inline] |
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] |
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 Double & | freqVal | ) |
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.
Int casa::CFBuffer::nMuellerElements | ( | ) | [inline] |
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 | ||
) |
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.
IPosition casa::CFBuffer::shape | ( | ) | [inline] |
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.
Cube<CountedPtr<CFCell> > casa::CFBuffer::cfCells_p [protected] |
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().
Cube<Int> casa::CFBuffer::cfHitsStats [protected] |
Definition at line 346 of file CFBuffer.h.
Vector<Vector<Int> > casa::CFBuffer::conjFreqNdxMap_p [protected] |
Definition at line 348 of file CFBuffer.h.
PolMapType casa::CFBuffer::conjMuellerElements_p [protected] |
Definition at line 340 of file CFBuffer.h.
PolMapType casa::CFBuffer::conjMuellerElementsIndex_p [protected] |
Definition at line 340 of file CFBuffer.h.
Vector<Vector<Int> > casa::CFBuffer::freqNdxMap_p [protected] |
Definition at line 348 of file CFBuffer.h.
Bool casa::CFBuffer::freqNdxMapsReady_p [protected] |
Definition at line 347 of file CFBuffer.h.
Double casa::CFBuffer::freqValIncr_p [protected] |
Definition at line 341 of file CFBuffer.h.
Vector<Double> casa::CFBuffer::freqValues_p [protected] |
Definition at line 339 of file CFBuffer.h.
Int casa::CFBuffer::maxXSupport_p [protected] |
Definition at line 344 of file CFBuffer.h.
Referenced by copyParams().
Int casa::CFBuffer::maxYSupport_p [protected] |
Definition at line 344 of file CFBuffer.h.
Referenced by copyParams().
PolMapType casa::CFBuffer::muellerElements_p [protected] |
Definition at line 340 of file CFBuffer.h.
PolMapType casa::CFBuffer::muellerElementsIndex_p [protected] |
Definition at line 340 of file CFBuffer.h.
MuellerMatrixType casa::CFBuffer::muellerMask_p [protected] |
Definition at line 342 of file CFBuffer.h.
Int casa::CFBuffer::nChan_p [protected] |
Definition at line 344 of file CFBuffer.h.
Int casa::CFBuffer::nPol_p [protected] |
Definition at line 344 of file CFBuffer.h.
Int casa::CFBuffer::nW_p [protected] |
Definition at line 344 of file CFBuffer.h.
Vector<Double> casa::CFBuffer::pointingOffset_p [protected] |
Definition at line 345 of file CFBuffer.h.
Double casa::CFBuffer::wValIncr_p [protected] |
Definition at line 341 of file CFBuffer.h.
Vector<Double> casa::CFBuffer::wValues_p [protected] |
Definition at line 339 of file CFBuffer.h.