casa::ProtoVR Class Reference

#include <ProtoVR.h>

Inheritance diagram for casa::ProtoVR:
casa::VisibilityResampler casa::VisibilityResamplerBase

List of all members.

Public Member Functions

 ProtoVR ()
virtual ~ProtoVR ()
 ProtoVR(const CFStore& cfs): VisibilityResampler(cfs) {}.
virtual VisibilityResamplerBaseclone ()
virtual void copyMaps (const ProtoVR &other)
 ProtoVR(const ProtoVR& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}.
virtual void copy (const VisibilityResamplerBase &other)
 VisibilityResampler& operator=(const VisibilityResampler& other);.
virtual void copy (const ProtoVR &other)
ProtoVRoperator= (const ProtoVR &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)
 virtual void setConvFunc(const CFStore& cfs) {convFuncStore_p = cfs;};
virtual void DataToGrid (Array< Complex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf)
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 >
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>=""> 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>& cfShape, Vector<Int>& loc, Vector<Int>& igrdpos, Double& sinDPA, Double& cosDPA, Bool& finitePointingOffset, Bool dopsf);
template<class T >
Complex accumulateOnGrid (T *gridStore, const Int *gridInc_p, const Complex *cached_phaseGrad_p, const Int cachedPhaseGradNX, const Int cachedPhaseGradNY, const Complex *convFuncV, const Int *cfInc_p, Complex nvalue, Double wVal, Int *scaledSupport_ptr, Float *scaledSampling_ptr, Double *off_ptr, Int *convOrigin_ptr, Int *cfShape, Int *loc_ptr, Int *iGrdpos_ptr, Bool finitePointingOffset, Bool doPSFOnly)
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)
virtual void DataToGrid (Array< DComplex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool useConjFreqCF=False)
 ------------------------------------------------------------------------------
virtual void DataToGrid (Array< Complex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool useConjFreqCF=False)

Private Member Functions

template<class T >
void DataToGridImpl_p (T *gridStore, Int *gridShape, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf)
 Re-sample the griddedData on the VisBuffer (a.k.a de-gridding).
*void sgrid (Double pos[2], Int loc[3], Double off[3], Complex &phasor, const Int &irow, const Matrix< Double > &uvw, const Double &dphase, const Double &freq, const Double *scale, const Double *offset, const Float sampling[2])
 void DataToGridImpl_p(Array<T>& griddedData, VBStore& vb, Matrix<Double>& sumwt,const Bool& dopsf, Bool /*useConjFreqCF
Bool onGrid (const Int &nx, const Int &ny, const Int &nw, const Int loc[3], const Int support[2])
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 *store, const Int *iPos, const Int inc[4])
 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 *store, const Int *iPos, const Int *inc, Complex &nvalue, Complex &wt)
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 (Int cfShape[4], VBStore &vbs, Double &wVal, Int &fndx, Int &wndx, Int **mNdx, Int **conjMNdx, Int &ipol, uInt &mRow)
void cachePhaseGrad_g (Complex *cached_phaseGrad_p, Int phaseGradNX, Int phaseGradNY, Double *cached_PointingOffset_p, Double *pointingOffset, Int cfShape[4], Int convOrigin[4])
 Complex* getConvFunc_p(Vector<Int>& cfShape, VBStorer& vbs, Double& wVal, Int& fndx, Int& wndx, PolMapType& mNdx, PolMapType& conjMNdx, Int& ipol, uInt& mRow);.

Private Attributes

Int gridInc_p [4]
 ------------------------------------------------------------------------------ ----------------------------Private parts------------------------------------- ------------------------------------------------------------------------------
Int cfInc_p [4]
Matrix< Complex > cached_phaseGrad_p
Vector< Double > cached_PointingOffset_p

Detailed Description

Definition at line 44 of file ProtoVR.h.


Constructor & Destructor Documentation

casa::ProtoVR::ProtoVR (  )  [inline]
virtual casa::ProtoVR::~ProtoVR (  )  [inline, virtual]

ProtoVR(const CFStore& cfs): VisibilityResampler(cfs) {}.

Definition at line 52 of file ProtoVR.h.


Member Function Documentation

template<class T >
void casa::ProtoVR::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]
template<class T >
Complex casa::ProtoVR::accumulateOnGrid ( T *  gridStore,
const Int *  gridInc_p,
const Complex *  cached_phaseGrad_p,
const Int  cachedPhaseGradNX,
const Int  cachedPhaseGradNY,
const Complex *  convFuncV,
const Int *  cfInc_p,
Complex  nvalue,
Double  wVal,
Int *  scaledSupport_ptr,
Float *  scaledSampling_ptr,
Double *  off_ptr,
Int *  convOrigin_ptr,
Int *  cfShape,
Int *  loc_ptr,
Int *  iGrdpos_ptr,
Bool  finitePointingOffset,
Bool  doPSFOnly 
) [inline, protected]
template<class T >
void casa::ProtoVR::addTo4DArray ( T *  store,
const Int *  iPos,
const 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 321 of file ProtoVR.h.

void casa::ProtoVR::cachePhaseGrad_g ( Complex *  cached_phaseGrad_p,
Int  phaseGradNX,
Int  phaseGradNY,
Double *  cached_PointingOffset_p,
Double *  pointingOffset,
Int  cfShape[4],
Int  convOrigin[4] 
) [private]

Complex* getConvFunc_p(Vector<Int>& cfShape, VBStorer& vbs, Double& wVal, Int& fndx, Int& wndx, PolMapType& mNdx, PolMapType& conjMNdx, Int& ipol, uInt& mRow);.

virtual VisibilityResamplerBase* casa::ProtoVR::clone (  )  [inline, virtual]

Reimplemented from casa::VisibilityResampler.

Definition at line 54 of file ProtoVR.h.

References ProtoVR().

virtual void casa::ProtoVR::copy ( const ProtoVR other  )  [inline, virtual]

Reimplemented from casa::VisibilityResamplerBase.

Definition at line 71 of file ProtoVR.h.

References cached_phaseGrad_p, cached_PointingOffset_p, copy(), and SETVEC().

virtual void casa::ProtoVR::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::VisibilityResampler.

Definition at line 62 of file ProtoVR.h.

Referenced by copy(), and operator=().

virtual void casa::ProtoVR::copyMaps ( const ProtoVR other  )  [inline, virtual]

ProtoVR(const ProtoVR& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}.

Definition at line 60 of file ProtoVR.h.

References casa::VisibilityResamplerBase::cfMap_p, casa::VisibilityResamplerBase::conjCFMap_p, and setCFMaps().

virtual void casa::ProtoVR::DataToGrid ( Array< Complex > &  griddedData,
VBStore vbs,
Matrix< Double > &  sumwt,
const Bool &  dopsf,
Bool  useConjFreqCF = False 
) [protected, virtual]

Reimplemented from casa::VisibilityResampler.

virtual void casa::ProtoVR::DataToGrid ( Array< DComplex > &  griddedData,
VBStore vbs,
Matrix< Double > &  sumwt,
const Bool &  dopsf,
Bool  = False 
) [protected, virtual]

------------------------------------------------------------------------------

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.

Reimplemented from casa::VisibilityResampler.

virtual void casa::ProtoVR::DataToGrid ( Array< Complex > &  griddedData,
VBStore vbs,
Matrix< Double > &  sumwt,
const Bool &  dopsf 
) [inline, virtual]

, rowBegin, rowEnd, startChan, endChan, nDataPol, nDataChan, vbSpw,useConjFreqCF

Parameters:
dopsf,Int& rowBegin, Int& rowEnd, Int& startChan, Int& endChan, Int& nDataPol, Int& nDataChan, Int& vbSpw, Bool useConjFreqCF=False

Definition at line 132 of file ProtoVR.h.

References DataToGridImpl_p().

virtual void casa::ProtoVR::DataToGrid ( Array< DComplex > &  griddedData,
VBStore vbs,
Matrix< Double > &  sumwt,
const Bool &  dopsf 
) [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*****

, rowBegin, rowEnd, startChan, endChan, nDataPol, nDataChan, vbSpw,useConjFreqCF

Parameters:
dopsf Int& rowBegin, Int& rowEnd, Int& startChan, Int& endChan, Int& nDataPol, Int& nDataChan, Int& vbSpw, Bool useConjFreqCF=False

Definition at line 115 of file ProtoVR.h.

References DataToGridImpl_p().

template<class T >
void casa::ProtoVR::DataToGridImpl_p ( T *  gridStore,
Int *  gridShape,
VBStore vbs,
Matrix< Double > &  sumwt,
const Bool &  dopsf 
) [inline, private]

Re-sample the griddedData on the VisBuffer (a.k.a de-gridding).

Parameters:
dopsf Int& rowBegin, Int& rowEnd, Int& startChan, Int& endChan, Int& nDataPol, Int& nDataChan, Int& vbSpw, const Bool accumCFs

Referenced by DataToGrid().

Complex casa::ProtoVR::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::ProtoVR::getConvFunc_p ( Int  cfShape[4],
VBStore vbs,
Double &  wVal,
Int &  fndx,
Int &  wndx,
Int **  mNdx,
Int **  conjMNdx,
Int &  ipol,
uInt &  mRow 
) [private]
virtual Complex casa::ProtoVR::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 157 of file ProtoVR.h.

DComplex casa::ProtoVR::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 313 of file ProtoVR.h.

Complex casa::ProtoVR::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 307 of file ProtoVR.h.

Complex casa::ProtoVR::getFrom4DArray ( const Complex *  store,
const Int *  iPos,
const Int  inc[4] 
) [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). inline Complex getFrom4DArray(const Complex *__restrict__& store, const Int* iPos, const Int* inc) { return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3])); return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]]; };

return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];

Definition at line 299 of file ProtoVR.h.

virtual void casa::ProtoVR::GridToData ( VBStore vbs,
const Array< Complex > &  griddedData 
) [virtual]

------------------------------------------------------------------------------

Re-sample VisBuffer to a regular grid (griddedData) (a.k.a. de-gridding)

Reimplemented from casa::VisibilityResampler.

Bool casa::ProtoVR::onGrid ( const Int &  nx,
const Int &  ny,
const Int &  nw,
const Int  loc[3],
const Int  support[2] 
) [inline, private]

Definition at line 263 of file ProtoVR.h.

ProtoVR& casa::ProtoVR::operator= ( const ProtoVR other  )  [inline]

Reimplemented from casa::VisibilityResamplerBase.

Definition at line 78 of file ProtoVR.h.

References cached_phaseGrad_p, cached_PointingOffset_p, copy(), and SETVEC().

Bool casa::ProtoVR::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::ProtoVR::setCFMaps ( const Vector< Int > &  cfMap,
const Vector< Int > &  conjCFMap 
) [inline, virtual]
template<class T >
void casa::ProtoVR::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 275 of file ProtoVR.h.

Referenced by copy(), operator=(), and setCFMaps().

* void casa::ProtoVR::sgrid ( Double  pos[2],
Int  loc[3],
Double  off[3],
Complex &  phasor,
const Int &  irow,
const Matrix< Double > &  uvw,
const Double &  dphase,
const Double &  freq,
const Double *  scale,
const Double *  offset,
const Float  sampling[2] 
) [private]

void DataToGridImpl_p(Array<T>& griddedData, VBStore& vb, Matrix<Double>& sumwt,const Bool& dopsf, Bool /*useConjFreqCF

template<class T >
void casa::ProtoVR::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]

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>& cfShape, Vector<Int>& loc, Vector<Int>& igrdpos, Double& sinDPA, Double& cosDPA, Bool& finitePointingOffset, Bool dopsf);


Member Data Documentation

Matrix<Complex> casa::ProtoVR::cached_phaseGrad_p [private]

Definition at line 236 of file ProtoVR.h.

Referenced by copy(), and operator=().

Vector<Double> casa::ProtoVR::cached_PointingOffset_p [private]

Definition at line 237 of file ProtoVR.h.

Referenced by copy(), operator=(), and ProtoVR().

Int casa::ProtoVR::cfInc_p[4] [private]

Definition at line 235 of file ProtoVR.h.

Int casa::ProtoVR::gridInc_p[4] [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 235 of file ProtoVR.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