#include <AWVisResampler.h>
Public Member Functions | |
AWVisResampler () | |
virtual | ~AWVisResampler () |
AWVisResampler(const CFStore& cfs): VisibilityResampler(cfs) {}. | |
virtual VisibilityResamplerBase * | clone () |
virtual void | copyMaps (const AWVisResampler &other) |
AWVisResampler(const AWVisResampler& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}. | |
virtual void | copy (const VisibilityResamplerBase &other) |
VisibilityResampler& operator=(const VisibilityResampler& other);. | |
virtual void | copy (const AWVisResampler &other) |
AWVisResampler & | operator= (const AWVisResampler &other) |
virtual void | setCFMaps (const Vector< Int > &cfMap, const Vector< Int > &conjCFMap) |
virtual void | DataToGrid (Array< DComplex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool useConjFreqCF=False) |
virtual void setConvFunc(const CFStore& cfs) {convFuncStore_p = cfs;}; | |
virtual void | DataToGrid (Array< Complex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool useConjFreqCF=False) |
virtual void | GridToData (VBStore &vbs, const Array< Complex > &griddedData) |
------------------------------------------------------------------------------ | |
Protected Member Functions | |
virtual Complex | getConvFuncVal (const Cube< Double > &convFunc, const Matrix< Double > &uvw, const Int &irow, const Vector< Int > &pixel) |
virtual void GridToData(VBStore& vbs, Array<Complex>& griddedData); | |
Complex | getCFArea (Complex *__restrict__ &convFuncV, Double &wVal, Vector< Int > &scaledSupport, Vector< Float > &scaledSampling, Vector< Double > &off, Vector< Int > &convOrigin, Vector< Int > &cfShape, Double &sinDPA, Double &cosDPA) |
template<class T > | |
Complex | accumulateOnGrid (Array< T > &grid, Complex *__restrict__ &convFuncV, Complex &nvalue, Double &wVal, Vector< Int > &scaledSupport, Vector< Float > &scaledSampling, Vector< Double > &off, Vector< Int > &convOrigin, Vector< Int > &, Vector< Int > &loc, Vector< Int > &igrdpos, Double &, Double &, Bool &finitePointingOffset, Bool dopsf) |
template<class T > | |
void | XInnerLoop (const Int *scaleSupport, const Float *scaledSampling, const Double *off, const Int *loc, Complex &cfArea, const Int *__restrict__ iGrdPosPtr, Complex *__restrict__ &convFuncV, const Int *convOrigin, Complex &nvalue, Double &wVal, Bool &, Bool &, T *__restrict__ gridStore, Int *iloc, Complex &norm, Int *igrdpos) |
template<class T > | |
void | accumulateFromGrid (T &nvalue, const T *__restrict__ &grid, Vector< Int > &iGrdPos, Complex *__restrict__ &convFuncV, Double &wVal, Vector< Int > &scaledSupport, Vector< Float > &scaledSampling, Vector< Double > &off, Vector< Int > &convOrigin, Vector< Int > &cfShape, Vector< Int > &loc, Complex &phasor, Double &sinDPA, Double &cosDPA, Bool &finitePointingOffset, Matrix< Complex > &cached_phaseGrad_p) |
Private Member Functions | |
template<class T > | |
void | DataToGridImpl_p (Array< T > &griddedData, VBStore &vb, Matrix< Double > &sumwt, const Bool &dopsf, Bool) |
Re-sample the griddedData on the VisBuffer (a.k.a de-gridding). | |
void | sgrid (Vector< Double > &pos, Vector< Int > &loc, Vector< Double > &off, Complex &phasor, const Int &irow, const Matrix< Double > &uvw, const Double &dphase, const Double &freq, const Vector< Double > &scale, const Vector< Double > &offset, const Vector< Float > &sampling) |
Bool | onGrid (const Int &nx, const Int &ny, const Int &nw, const Vector< Int > &loc, const Vector< Int > &support) |
template<class T > | |
void | SETVEC (Vector< T > &lhs, const Vector< T > &rhs) |
Array assignment operator in CASACore requires lhs.nelements() == 0 or lhs.nelements()=rhs.nelements(). | |
Complex | getFrom4DArray (const Complex *__restrict__ &store, const Int *iPos, const Int *inc) |
Internal methods to address a 4D array. | |
Complex | getFrom4DArray (const Complex *__restrict__ &store, const Vector< Int > &iPos, const Vector< Int > &inc) |
The following two methods are called in the innermost loop. | |
DComplex | getFrom4DArray (const DComplex *__restrict__ &store, const Vector< Int > &iPos, const Vector< Int > &inc) |
template<class T > | |
void | addTo4DArray (T *__restrict__ &store, const Int *__restrict__ &iPos, const Vector< Int > &inc, Complex &nvalue, Complex &wt) __restrict__ |
Bool | reindex (const Vector< Int > &in, Vector< Int > &out, const Double &sinDPA, const Double &cosDPA, const Vector< Int > &Origin, const Vector< Int > &size) |
This rotates the convolution function by rotating the co-ordinate system. | |
Complex * | getConvFunc_p (Vector< Int > &cfShape, CFBuffer &cfb, Double &wVal, Int &fndx, Int &wndx, PolMapType &mNdx, PolMapType &conjMNdx, Int &ipol, uInt &mRow) |
void | cachePhaseGrad_p (const Vector< Double > &pointingOffset, const Vector< Int > &cfShape, const Vector< Int > &convOrigin, const Double &cfRefFreq, const Double &imRefFreq, const Int &spwID=0, const Int &fieldId=0) |
Private Attributes | |
Vector< Int > | gridInc_p |
------------------------------------------------------------------------------ ----------------------------Private parts------------------------------------- ------------------------------------------------------------------------------ | |
Vector< Int > | cfInc_p |
Matrix< Complex > | cached_phaseGrad_p |
Vector< Double > | cached_PointingOffset_p |
Definition at line 45 of file AWVisResampler.h.
casa::refim::AWVisResampler::AWVisResampler | ( | ) | [inline] |
Definition at line 48 of file AWVisResampler.h.
References cached_PointingOffset_p, casa::refim::VisibilityResamplerBase::runTimeDG_p, and casa::refim::VisibilityResamplerBase::runTimeG_p.
Referenced by clone().
virtual casa::refim::AWVisResampler::~AWVisResampler | ( | ) | [inline, virtual] |
AWVisResampler(const CFStore& cfs): VisibilityResampler(cfs) {}.
Definition at line 53 of file AWVisResampler.h.
void casa::refim::AWVisResampler::accumulateFromGrid | ( | T & | nvalue, | |
const T *__restrict__ & | grid, | |||
Vector< Int > & | iGrdPos, | |||
Complex *__restrict__ & | convFuncV, | |||
Double & | wVal, | |||
Vector< Int > & | scaledSupport, | |||
Vector< Float > & | scaledSampling, | |||
Vector< Double > & | off, | |||
Vector< Int > & | convOrigin, | |||
Vector< Int > & | cfShape, | |||
Vector< Int > & | loc, | |||
Complex & | phasor, | |||
Double & | sinDPA, | |||
Double & | cosDPA, | |||
Bool & | finitePointingOffset, | |||
Matrix< Complex > & | cached_phaseGrad_p | |||
) | [inline, protected] |
Complex casa::refim::AWVisResampler::accumulateOnGrid | ( | Array< T > & | grid, | |
Complex *__restrict__ & | convFuncV, | |||
Complex & | nvalue, | |||
Double & | wVal, | |||
Vector< Int > & | scaledSupport, | |||
Vector< Float > & | scaledSampling, | |||
Vector< Double > & | off, | |||
Vector< Int > & | convOrigin, | |||
Vector< Int > & | , | |||
Vector< Int > & | loc, | |||
Vector< Int > & | igrdpos, | |||
Double & | , | |||
Double & | , | |||
Bool & | finitePointingOffset, | |||
Bool | dopsf | |||
) | [inline, protected] |
void casa::refim::AWVisResampler::addTo4DArray | ( | T *__restrict__ & | store, | |
const Int *__restrict__ & | iPos, | |||
const Vector< Int > & | inc, | |||
Complex & | nvalue, | |||
Complex & | wt | |||
) | [inline, private] |
T *tmp=store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]); tmp += nvalue*wt;
Definition at line 261 of file AWVisResampler.h.
void casa::refim::AWVisResampler::cachePhaseGrad_p | ( | const Vector< Double > & | pointingOffset, | |
const Vector< Int > & | cfShape, | |||
const Vector< Int > & | convOrigin, | |||
const Double & | cfRefFreq, | |||
const Double & | imRefFreq, | |||
const Int & | spwID = 0 , |
|||
const Int & | fieldId = 0 | |||
) | [private] |
virtual VisibilityResamplerBase* casa::refim::AWVisResampler::clone | ( | ) | [inline, virtual] |
Reimplemented from casa::refim::VisibilityResampler.
Definition at line 55 of file AWVisResampler.h.
References AWVisResampler().
virtual void casa::refim::AWVisResampler::copy | ( | const AWVisResampler & | other | ) | [inline, virtual] |
Reimplemented from casa::refim::VisibilityResamplerBase.
Definition at line 72 of file AWVisResampler.h.
References cached_phaseGrad_p, cached_PointingOffset_p, copy(), and SETVEC().
virtual void casa::refim::AWVisResampler::copy | ( | const VisibilityResamplerBase & | other | ) | [inline, virtual] |
VisibilityResampler& operator=(const VisibilityResampler& other);.
const Vector<Int> cfmap=other.getCFMap(); const Vector<Int> conjcfmap = other.getConjCFMap();
setCFMaps(cfmap,conjcfmap);
Reimplemented from casa::refim::VisibilityResampler.
Definition at line 63 of file AWVisResampler.h.
Referenced by copy(), and operator=().
virtual void casa::refim::AWVisResampler::copyMaps | ( | const AWVisResampler & | other | ) | [inline, virtual] |
AWVisResampler(const AWVisResampler& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}.
Definition at line 61 of file AWVisResampler.h.
References casa::refim::VisibilityResamplerBase::cfMap_p, casa::refim::VisibilityResamplerBase::conjCFMap_p, and setCFMaps().
virtual void casa::refim::AWVisResampler::DataToGrid | ( | Array< Complex > & | griddedData, | |
VBStore & | vbs, | |||
Matrix< Double > & | sumwt, | |||
const Bool & | dopsf, | |||
Bool | useConjFreqCF = False | |||
) | [inline, virtual] |
Reimplemented from casa::refim::VisibilityResampler.
Definition at line 120 of file AWVisResampler.h.
References DataToGridImpl_p().
virtual void casa::refim::AWVisResampler::DataToGrid | ( | Array< DComplex > & | griddedData, | |
VBStore & | vbs, | |||
Matrix< Double > & | sumwt, | |||
const Bool & | dopsf, | |||
Bool | useConjFreqCF = False | |||
) | [inline, virtual] |
virtual void setConvFunc(const CFStore& cfs) {convFuncStore_p = cfs;};
------------------------------------------------------------------------------
Re-sample the griddedData on the VisBuffer (a.k.a gridding).
In this class, these just call the private templated version. The first variant grids onto a double precision grid while the second one does it on a single precision grid.
Note that the following calls allow using any CFStore object for gridding while de-gridding uses the internal convFuncStore_p object. virtual void DataToGrid(Array<DComplex>& griddedData, VBStore& vbs, Matrix<Double>& sumwt, const Bool& dopsf, CFStore& cfs) {DataToGridImpl_p(griddedData, vbs, sumwt,dopsf,cfs);}
virtual void DataToGrid(Array<Complex>& griddedData, VBStore& vbs, Matrix<Double>& sumwt, const Bool& dopsf, CFStore& cfs) {DataToGridImpl_p(griddedData, vbs, sumwt,dopsf,cfs);}
Simulating defaulting CFStore arguemnt in the above calls to convFuncStore_p
TEMP REMOVAL OF DComplex gridder*****
Reimplemented from casa::refim::VisibilityResampler.
Definition at line 116 of file AWVisResampler.h.
References DataToGridImpl_p().
void casa::refim::AWVisResampler::DataToGridImpl_p | ( | Array< T > & | griddedData, | |
VBStore & | vb, | |||
Matrix< Double > & | sumwt, | |||
const Bool & | dopsf, | |||
Bool | ||||
) | [inline, private] |
Re-sample the griddedData on the VisBuffer (a.k.a de-gridding).
Referenced by DataToGrid().
Complex casa::refim::AWVisResampler::getCFArea | ( | Complex *__restrict__ & | convFuncV, | |
Double & | wVal, | |||
Vector< Int > & | scaledSupport, | |||
Vector< Float > & | scaledSampling, | |||
Vector< Double > & | off, | |||
Vector< Int > & | convOrigin, | |||
Vector< Int > & | cfShape, | |||
Double & | sinDPA, | |||
Double & | cosDPA | |||
) | [protected] |
Complex* casa::refim::AWVisResampler::getConvFunc_p | ( | Vector< Int > & | cfShape, | |
CFBuffer & | cfb, | |||
Double & | wVal, | |||
Int & | fndx, | |||
Int & | wndx, | |||
PolMapType & | mNdx, | |||
PolMapType & | conjMNdx, | |||
Int & | ipol, | |||
uInt & | mRow | |||
) | [private] |
virtual Complex casa::refim::AWVisResampler::getConvFuncVal | ( | const Cube< Double > & | convFunc, | |
const Matrix< Double > & | uvw, | |||
const Int & | irow, | |||
const Vector< Int > & | pixel | |||
) | [inline, protected, virtual] |
virtual void GridToData(VBStore& vbs, Array<Complex>& griddedData);
Definition at line 132 of file AWVisResampler.h.
DComplex casa::refim::AWVisResampler::getFrom4DArray | ( | const DComplex *__restrict__ & | store, | |
const Vector< Int > & | iPos, | |||
const Vector< Int > & | inc | |||
) | [inline, private] |
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];
Definition at line 253 of file AWVisResampler.h.
Complex casa::refim::AWVisResampler::getFrom4DArray | ( | const Complex *__restrict__ & | store, | |
const Vector< Int > & | iPos, | |||
const Vector< Int > & | inc | |||
) | [inline, private] |
The following two methods are called in the innermost loop.
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];
Definition at line 247 of file AWVisResampler.h.
Complex casa::refim::AWVisResampler::getFrom4DArray | ( | const Complex *__restrict__ & | store, | |
const Int * | iPos, | |||
const Int * | inc | |||
) | [inline, private] |
Internal methods to address a 4D array.
These should ulimately moved to a Array4D class in CASACore
This is called less frequently. Currently once per VisBuffer inline void cacheAxisIncrements(const Vector<Int>& n, Vector<Int>& inc) {inc.resize(4);inc[0]=1, inc[1]=inc[0]*n[0], inc[2]=inc[1]*n[1], inc[3]=inc[2]*n[2];(void)n[3];}
The following method is also called from the inner loop, but does not use CASA Vector (which are not thread safe, I (SB) am told).
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];
Definition at line 239 of file AWVisResampler.h.
virtual void casa::refim::AWVisResampler::GridToData | ( | VBStore & | vbs, | |
const Array< Complex > & | griddedData | |||
) | [virtual] |
------------------------------------------------------------------------------
Re-sample VisBuffer to a regular grid (griddedData) (a.k.a. de-gridding)
Reimplemented from casa::refim::VisibilityResampler.
Bool casa::refim::AWVisResampler::onGrid | ( | const Int & | nx, | |
const Int & | ny, | |||
const Int & | nw, | |||
const Vector< Int > & | loc, | |||
const Vector< Int > & | support | |||
) | [inline, private] |
Definition at line 210 of file AWVisResampler.h.
AWVisResampler& casa::refim::AWVisResampler::operator= | ( | const AWVisResampler & | other | ) | [inline] |
Reimplemented from casa::refim::VisibilityResamplerBase.
Definition at line 79 of file AWVisResampler.h.
References cached_phaseGrad_p, cached_PointingOffset_p, copy(), and SETVEC().
Bool casa::refim::AWVisResampler::reindex | ( | const Vector< Int > & | in, | |
Vector< Int > & | out, | |||
const Double & | sinDPA, | |||
const Double & | cosDPA, | |||
const Vector< Int > & | Origin, | |||
const Vector< Int > & | size | |||
) | [private] |
This rotates the convolution function by rotating the co-ordinate system.
For the accuracies already required for EVLA and ALMA, this is not useful. Leaving it hear for now...\.
virtual void casa::refim::AWVisResampler::setCFMaps | ( | const Vector< Int > & | cfMap, | |
const Vector< Int > & | conjCFMap | |||
) | [inline, virtual] |
Reimplemented from casa::refim::VisibilityResampler.
Definition at line 87 of file AWVisResampler.h.
References casa::refim::VisibilityResamplerBase::cfMap_p, casa::refim::VisibilityResamplerBase::conjCFMap_p, and SETVEC().
Referenced by copyMaps().
void casa::refim::AWVisResampler::SETVEC | ( | Vector< T > & | lhs, | |
const Vector< T > & | rhs | |||
) | [inline, private] |
Array assignment operator in CASACore requires lhs.nelements() == 0 or lhs.nelements()=rhs.nelements().
Definition at line 222 of file AWVisResampler.h.
Referenced by copy(), operator=(), and setCFMaps().
void casa::refim::AWVisResampler::sgrid | ( | Vector< Double > & | pos, | |
Vector< Int > & | loc, | |||
Vector< Double > & | off, | |||
Complex & | phasor, | |||
const Int & | irow, | |||
const Matrix< Double > & | uvw, | |||
const Double & | dphase, | |||
const Double & | freq, | |||
const Vector< Double > & | scale, | |||
const Vector< Double > & | offset, | |||
const Vector< Float > & | sampling | |||
) | [private] |
void casa::refim::AWVisResampler::XInnerLoop | ( | const Int * | scaleSupport, | |
const Float * | scaledSampling, | |||
const Double * | off, | |||
const Int * | loc, | |||
Complex & | cfArea, | |||
const Int *__restrict__ | iGrdPosPtr, | |||
Complex *__restrict__ & | convFuncV, | |||
const Int * | convOrigin, | |||
Complex & | nvalue, | |||
Double & | wVal, | |||
Bool & | , | |||
Bool & | , | |||
T *__restrict__ | gridStore, | |||
Int * | iloc, | |||
Complex & | norm, | |||
Int * | igrdpos | |||
) | [inline, protected] |
Matrix<Complex> casa::refim::AWVisResampler::cached_phaseGrad_p [private] |
Definition at line 194 of file AWVisResampler.h.
Referenced by copy(), and operator=().
Vector<Double> casa::refim::AWVisResampler::cached_PointingOffset_p [private] |
Definition at line 195 of file AWVisResampler.h.
Referenced by AWVisResampler(), copy(), and operator=().
Vector<Int> casa::refim::AWVisResampler::cfInc_p [private] |
Definition at line 193 of file AWVisResampler.h.
Vector<Int> casa::refim::AWVisResampler::gridInc_p [private] |
------------------------------------------------------------------------------ ----------------------------Private parts------------------------------------- ------------------------------------------------------------------------------
Vector<Double> uvwScale_p, offset_p, dphase_p; Vector<Int> chanMap_p, polMap_p; CFStore convFuncStore_p; Int inc0_p, inc1_p, inc2_p, inc3_p; Vector<Int> inc_p; Vector<Int> cfMap_p, conjCFMap_p;
Definition at line 193 of file AWVisResampler.h.