29 #ifndef SYNTHESIS_TRANSFORM2_AWVISRESAMPLER_H
30 #define SYNTHESIS_TRANSFORM2_AWVISRESAMPLER_H
135 (void)uvw; (void)irow;
return convFunc(pixel[0],pixel[1],pixel[2]);
163 T* __restrict__ gridStore,
214 return (((loc(0)-support[0]) >= 0 ) && ((loc(0)+support[0]) < nx) &&
215 ((loc(1)-support[1]) >= 0 ) && ((loc(1)+support[1]) < ny) &&
216 (loc(2) >= 0) && (loc(2) <= nw));
242 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
250 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
256 return *(store+(iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]));
267 store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]] += (nvalue*wt);
278 store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]] += (nvalue*wt);
void cachePhaseGrad_p(const casacore::Vector< casacore::Double > &pointingOffset, const casacore::Vector< casacore::Int > &cfShape, const casacore::Vector< casacore::Int > &convOrigin, const casacore::Double &cfRefFreq, const casacore::Double &imRefFreq, const casacore::Int &spwID=0, const casacore::Int &fieldId=0)
casacore::Bool onGrid(const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &nw, const casacore::Vector< casacore::Int > &loc, const casacore::Vector< casacore::Int > &support)
virtual void setCFMaps(const casacore::Vector< casacore::Int > &cfMap, const casacore::Vector< casacore::Int > &conjCFMap)
std::complex< Float > Complex
void DataToGridImpl_p(casacore::Array< T > &griddedData, VBStore &vb, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool)
Re-sample the griddedData on the VisBuffer (a.k.a de-gridding).
virtual void DataToGrid(casacore::Array< casacore::Complex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool useConjFreqCF=false)
casacore::Vector< casacore::Int > gridInc_p
----------------------——Private parts-------------------------------——
void addTo4DArray_ptr(T *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Int *__restrict__ &inc, casacore::Complex &nvalue, casacore::Complex &wt) __restrict__
void copy(const VisibilityResamplerBase &other)
VisibilityResampler& operator=(const VisibilityResampler& other);.
casacore::DComplex getFrom4DArray(const casacore::DComplex *__restrict__ &store, const casacore::Vector< casacore::Int > &iPos, const casacore::Vector< casacore::Int > &inc)
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 > &, casacore::Vector< casacore::Int > &loc, casacore::Vector< casacore::Int > &igrdpos, casacore::Double &, casacore::Double &, casacore::Bool &finitePointingOffset, casacore::Bool dopsf)
casacore::Matrix< casacore::Complex > cached_phaseGrad_p
casacore::Complex getFrom4DArray(const casacore::Complex *__restrict__ &store, const casacore::Int *iPos, const casacore::Int *inc)
Internal methods to address a 4D array.
casacore::Vector< casacore::Int > cfMap_p
T norm(const casacore::Vector< T > &x)
The magnitude/norm of a vector.
AWVisResampler()
cached_phaseGrad_p(),
virtual void DataToGrid(casacore::Array< casacore::DComplex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool useConjFreqCF=false)
virtual void setConvFunc(const CFStore& cfs) {convFuncStore_p = cfs;};
virtual void copy(const VisibilityResamplerBase &other)
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.
casacore::Vector< casacore::Int > cfInc_p
void sgrid(casacore::Vector< casacore::Double > &pos, casacore::Vector< casacore::Int > &loc, casacore::Vector< casacore::Double > &off, casacore::Complex &phasor, const casacore::Int &irow, const casacore::Matrix< casacore::Double > &uvw, const casacore::Double &dphase, const casacore::Double &freq, const casacore::Vector< casacore::Double > &scale, const casacore::Vector< casacore::Double > &offset, const casacore::Vector< casacore::Float > &sampling)
casacore::Vector< casacore::Double > cached_PointingOffset_p
casacore::Matrix<casacore::Complex> cached_phaseGrad_p;
Referenced counted pointer for constant data.
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.
casacore::Vector< casacore::Int > conjCFMap_p
std::complex< Double > DComplex
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 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); ...
casacore::Double runTimeDG_p
const IPosition & shape() const
The length of the Vector.
AWVisResampler & operator=(const AWVisResampler &other)
virtual void copyMaps(const AWVisResampler &other)
AWVisResampler(const AWVisResampler& other): VisibilityResampler(other),cfMap_p(), conjCFMap_p() {copy(other);}.
void SETVEC(casacore::Vector< T > &lhs, const casacore::Vector< T > &rhs)
bool Bool
Define the standard types used by Casacore.
Origin
casacore::Data for raster plots, which can be thought of as three-dimensional.
virtual ~AWVisResampler()
AWVisResampler(const CFStore& cfs): VisibilityResampler(cfs) {}.
casacore::Complex * getConvFunc_p(const double &vbPA, casacore::Vector< casacore::Int > &cfShape, casacore::Vector< int > &support, int &muellerElement, CountedPtr< CFBuffer > &cfb, casacore::Double &wVal, casacore::Int &fndx, casacore::Int &wndx, PolMapType &mNdx, PolMapType &conjMNdx, casacore::Int &ipol, casacore::uInt &mRow)
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)
virtual void copy(const AWVisResampler &other)
void addTo4DArray(T *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Vector< casacore::Int > &inc, casacore::Complex &nvalue, casacore::Complex &wt) __restrict__
casacore::Double runTimeG_p
virtual void GridToData(VBStore &vbs, const casacore::Array< casacore::Complex > &griddedData)
void accumulateFromGrid(T &nvalue, casacore::Complex &norm, 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)
void resize(size_t len, Bool copyValues=False)
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)
virtual VisibilityResamplerBase * clone()