29 #ifndef SYNTHESIS_CUAWVISRESAMPLER_H
30 #define SYNTHESIS_CUAWVISRESAMPLER_H
160 (void)uvw; (void)irow;
return convFunc(pixel[0],pixel[1],pixel[2]);
188 T* __restrict__ gridStore,
267 return (((loc[0]-support[0]) >= 0 ) && ((loc[0]+support[0]) < nx) &&
268 ((loc[1]-support[1]) >= 0 ) && ((loc[1]+support[1]) < ny) &&
269 (loc[2] >= 0) && (loc[2] <= nw));
302 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
310 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
316 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
327 store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]] += (nvalue*wt);
ProtoVR & operator=(const ProtoVR &other)
void SETVEC(casacore::Vector< T > &lhs, const casacore::Vector< T > &rhs)
casacore::Array assignment operator in CASACore requires lhs.nelements() == 0 or lhs.nelements()=rhs.nelements()
virtual void copy(const VisibilityResamplerBase &other)
VisibilityResampler& operator=(const VisibilityResampler& other);.
casacore::Vector< casacore::Int > cfMap_p
void copy(const VisibilityResamplerBase &other)
VisibilityResampler& operator=(const VisibilityResampler& other);.
std::complex< Float > Complex
virtual void copy(const ProtoVR &other)
void SETVEC(casacore::Vector< T > &lhs, const casacore::Vector< T > &rhs)
casacore::Complex accumulateOnGrid(T *gridStore, const casacore::Int *gridInc_p, const casacore::Complex *cached_phaseGrad_p, const casacore::Int cachedPhaseGradNX, const casacore::Int cachedPhaseGradNY, const casacore::Complex *convFuncV, const casacore::Int *cfInc_p, casacore::Complex nvalue, casacore::Double wVal, casacore::Int *scaledSupport_ptr, casacore::Float *scaledSampling_ptr, casacore::Double *off_ptr, casacore::Int *convOrigin_ptr, casacore::Int *cfShape, casacore::Int *loc_ptr, casacore::Int *iGrdpos_ptr, casacore::Bool finitePointingOffset, casacore::Bool doPSFOnly)
casacore::DComplex getFrom4DArray(const casacore::DComplex *__restrict__ &store, const casacore::Vector< casacore::Int > &iPos, const casacore::Vector< casacore::Int > &inc)
casacore::Vector< casacore::Double > cached_PointingOffset_p
virtual void DataToGrid(casacore::Array< casacore::DComplex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf)
virtual void setConvFunc(const CFStore& cfs) {convFuncStore_p = cfs;};
casacore::Vector< casacore::Int > conjCFMap_p
casacore::Bool reindex(const casacore::Vector< casacore::Int > &in, casacore::Vector< casacore::Int > &out, const casacore::Double &sinDPA, const casacore::Double &cosDPA, const casacore::Vector< casacore::Int > &Origin, const casacore::Vector< casacore::Int > &size)
This rotates the convolution function by rotating the co-ordinate system.
void XInnerLoop(const casacore::Int *scaleSupport, const casacore::Float *scaledSampling, const casacore::Double *off, const casacore::Int *loc, casacore::Complex &cfArea, const casacore::Int *__restrict__ iGrdPosPtr, casacore::Complex *__restrict__ &convFuncV, const casacore::Int *convOrigin, casacore::Complex &nvalue, casacore::Double &wVal, casacore::Bool &, casacore::Bool &, T *__restrict__ gridStore, casacore::Int *iloc, casacore::Complex &norm, casacore::Int *igrdpos)
template <class t>=""> casacore::Complex accumulateOnGrid(casacore::Array<T>& grid, casacore::Complex* restrict& convFuncV, casacore::Complex& nvalue, casacore::Double& wVal, casacore::Vector<casacore::Int>& scaledSupport, casacore::Vector<casacore::Float>& scaledSampling, casacore::Vector<casacore::Double>& off, casacore::Vector<casacore::Int>& convOrigin, casacore::Vector<casacore::Int>& cfShape, casacore::Vector<casacore::Int>& loc, casacore::Vector<casacore::Int>& igrdpos, casacore::Double& sinDPA, casacore::Double& cosDPA, casacore::Bool& finitePointingOffset, casacore::Bool dopsf);
T norm(const casacore::Vector< T > &x)
The magnitude/norm of a vector.
virtual VisibilityResamplerBase * clone()
T * getStorage(Bool &deleteIt)
Generally use of this should be shunned, except to use a FORTRAN routine or something similar...
casacore::Double runTimeG_p
void DataToGridImpl_p(T *gridStore, casacore::Int *gridShape, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf)
Re-sample the griddedData on the VisBuffer (a.k.a de-gridding).
void accumulateFromGrid(T &nvalue, const T *__restrict__ &grid, casacore::Vector< casacore::Int > &iGrdPos, casacore::Complex *__restrict__ &convFuncV, casacore::Double &wVal, casacore::Vector< casacore::Int > &scaledSupport, casacore::Vector< casacore::Float > &scaledSampling, casacore::Vector< casacore::Double > &off, casacore::Vector< casacore::Int > &convOrigin, casacore::Vector< casacore::Int > &cfShape, casacore::Vector< casacore::Int > &loc, casacore::Complex &phasor, casacore::Double &sinDPA, casacore::Double &cosDPA, casacore::Bool &finitePointingOffset, casacore::Matrix< casacore::Complex > &cached_phaseGrad_p)
virtual ~ProtoVR()
ProtoVR(const CFStore& cfs): VisibilityResampler(cfs) {}.
std::complex< Double > DComplex
void addTo4DArray(T *store, const casacore::Int *iPos, const casacore::Int *inc, casacore::Complex &nvalue, casacore::Complex &wt)
const IPosition & shape() const
The length of the Vector.
virtual void copyMaps(const ProtoVR &other)
ProtoVR(const ProtoVR& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}...
casacore::Int gridInc_p[4]
----------------------——Private parts-------------------------------——
casacore::Bool onGrid(const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &nw, const casacore::Int loc[3], const casacore::Int support[2])
bool Bool
Define the standard types used by Casacore.
Origin
casacore::Data for raster plots, which can be thought of as three-dimensional.
virtual casacore::Complex getConvFuncVal(const casacore::Cube< casacore::Double > &convFunc, const casacore::Matrix< casacore::Double > &uvw, const casacore::Int &irow, const casacore::Vector< casacore::Int > &pixel)
virtual void GridToData(VBStore& vbs, casacore::Array<casacore::Complex>& griddedData); ...
virtual void DataToGrid(casacore::Array< casacore::Complex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf)
casacore::Complex getFrom4DArray(const casacore::Complex *__restrict__ &store, const casacore::Vector< casacore::Int > &iPos, const casacore::Vector< casacore::Int > &inc)
The following two methods are called in the innermost loop.
virtual void GridToData(VBStore &vbs, const casacore::Array< casacore::Complex > &griddedData)
virtual void setCFMaps(const casacore::Vector< casacore::Int > &cfMap, const casacore::Vector< casacore::Int > &conjCFMap)
casacore::Complex getFrom4DArray(const casacore::Complex *store, const casacore::Int *iPos, const casacore::Int inc[4])
Internal methods to address a 4D array.
casacore::Double runTimeDG_p
*void sgrid(casacore::Double pos[2], casacore::Int loc[3], casacore::Double off[3], casacore::Complex &phasor, const casacore::Int &irow, const casacore::Matrix< casacore::Double > &uvw, const casacore::Double &dphase, const casacore::Double &freq, const casacore::Double *scale, const casacore::Double *offset, const casacore::Float sampling[2])
void DataToGridImpl_p(casacore::Array<T>& griddedData, VBStore& vb, casacore::Matrix<casacore::Double...
casacore::Complex * getConvFunc_p(casacore::Int cfShape[4], VBStore &vbs, casacore::Double &wVal, casacore::Int &fndx, casacore::Int &wndx, casacore::Int **mNdx, casacore::Int **conjMNdx, casacore::Int &ipol, casacore::uInt &mRow)
void resize(size_t len, Bool copyValues=False)
casacore::Matrix< casacore::Complex > cached_phaseGrad_p
Vector< Int > asVector() const
void cachePhaseGrad_g(casacore::Complex *cached_phaseGrad_p, casacore::Int phaseGradNX, casacore::Int phaseGradNY, casacore::Double *cached_PointingOffset_p, casacore::Double *pointingOffset, casacore::Int cfShape[4], casacore::Int convOrigin[4])
casacore::Complex* getConvFunc_p(casacore::Vector<casacore::Int>& cfShape, VBStorer& vbs...
casacore::Complex getCFArea(casacore::Complex *__restrict__ &convFuncV, casacore::Double &wVal, casacore::Vector< casacore::Int > &scaledSupport, casacore::Vector< casacore::Float > &scaledSampling, casacore::Vector< casacore::Double > &off, casacore::Vector< casacore::Int > &convOrigin, casacore::Vector< casacore::Int > &cfShape, casacore::Double &sinDPA, casacore::Double &cosDPA)
const IPosition & shape() const
The length of each axis.