29 #ifndef SYNTHESIS_VISIBILITYRESAMPLERBASE_H
30 #define SYNTHESIS_VISIBILITYRESAMPLERBASE_H
182 return (((loc(0)-support[0]) >= 0 ) && ((loc(0)+support[0]) < nx) &&
183 ((loc(1)-support[1]) >= 0 ) && ((loc(1)+support[1]) < ny));
189 return (((loc0-support) >= 0 ) && ((loc0+support) < nx) &&
190 ((loc1-support) >= 0 ) && ((loc1+support) < ny));
220 {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];}
223 {inc[0]=1; inc[1]=inc[0]*n[0]; inc[2]=inc[1]*n[1]; inc[3]=inc[2]*n[2];(void)n[3];}
239 {store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]] += (nvalue*
casacore::Complex(wt));}
243 {store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]] += (nvalue*
casacore::Complex(wt));}
250 {
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];};
255 {
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];};
261 {
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];};
266 {
return store[iPos[0] + iPos[1]*inc[1] + iPos[2]*inc[2] +iPos[3]*inc[3]];};
void cacheAxisIncrements(const casacore::Vector< casacore::Int > &n, casacore::Vector< casacore::Int > &inc)
void initializeToSky(const casacore::Array< casacore::Complex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
casacore::Matrix< casacore::Double > spwChanFreq_p
casacore::Double runTimeG6_p
casacore::Vector< casacore::Int > cfMap_p
void sgrid(casacore::Int &ndim, casacore::Double *__restrict__ pos, casacore::Int *__restrict__ loc, casacore::Int *__restrict__ off, casacore::Complex &phasor, const casacore::Int &irow, const casacore::Double *__restrict__ uvw, const casacore::Double &dphase, const casacore::Double &freq, const casacore::Double *__restrict__ scale, const casacore::Double *__restrict__ offset, const casacore::Float *__restrict__ sampling)
casacore::Int *__restrict__ incPtr_p
std::complex< Float > Complex
casacore::Vector< casacore::Int > inc_p
casacore::Int inc0_p, inc1_p, inc2_p, inc3_p;
void finalizeToSky(casacore::Array< casacore::DComplex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
Aliases for more readable code at the FTMachine layer.
void addTo4DArray(casacore::DComplex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
Version that use internally cached inc_p template <class t>="">
virtual void setConvFunc(const CFStore &cfs)=0
const casacore::Vector< casacore::Int > getCFMap()
virtual void init(const casacore::Bool &doublePrecision)=0
Forward looking genealogical baggage – required for the MultiThreadedVisibilityResampler.
VBRow2CFBMapType vbRow2CFBMap_p
casacore::Vector< casacore::Int > conjCFMap_p
casacore::Double runTimeG2_p
VisibilityResamplerBase(const VisibilityResamplerBase &other)
VisibilityResamplerBase(const CFStore& cfs): uvwScale_p(), offset_p(), chanMap_p(), polMap_p(), convFuncStore_p(), inc_p(), cfMap_p(), conjCFMap_p() {setConvFunc(cfs);};.
The base class to compute convolution functions for convolutional gridding.
casacore::DComplex getFrom4DArray(const casacore::DComplex *__restrict__ &store, const casacore::Vector< casacore::Int > iPos, const casacore::Vector< casacore::Int > &inc)
restrict
casacore::Bool onGrid(const casacore::Int &nx, const casacore::Int &ny, const casacore::Vector< casacore::Int > &__restrict__ loc, const casacore::Vector< casacore::Int > &__restrict__ support) __restrict__
virtual void GatherGrids(casacore::Array< casacore::DComplex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)=0
T * getStorage(Bool &deleteIt)
Generally use of this should be shunned, except to use a FORTRAN routine or something similar...
casacore::Double runTimeG_p
VisibilityResamplerBase()
void cacheAxisIncrements(const casacore::Int n[4], casacore::Int inc[4])
casacore::Double runTimeG4_p
casacore::Complex getFrom4DArray(const casacore::Complex *__restrict__ &store, const casacore::Vector< casacore::Int > iPos, const casacore::Vector< casacore::Int > &inc)
restrict
const casacore::Vector< casacore::Int > getConjCFMap()
casacore::DComplex getFrom4DArray(const casacore::DComplex *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Vector< casacore::Int > &inc)
restrict
VBRow2CFMapType & getVBRow2CFMap()
virtual void ComputeResiduals(VBStore &vbs)=0
virtual void GridToData(VBStore& vbs, casacore::Array<casacore::Complex>& griddedData); ...
casacore::Matrix< casacore::Double > spwChanConjFreq_p
casacore::Vector< casacore::Int > chanMap_p
std::complex< Double > DComplex
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
casacore::Bool onGrid(const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &loc0, const casacore::Int &loc1, const casacore::Int &support) __restrict__
virtual void setParams(const casacore::Vector< casacore::Double > &uvwScale, const casacore::Vector< casacore::Double > &offset, const casacore::Vector< casacore::Double > &dphase)=0
casacore::Vector< casacore::Double > uvwScale_p
-------------------------—Private parts----------------------------------—
virtual void setFreqMaps(const casacore::Matrix< casacore::Double > &spwChanFreqs, const casacore::Matrix< casacore::Double > &spwnChanConjFreqs)=0
bool Bool
Define the standard types used by Casacore.
void addTo4DArray(casacore::Complex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Int *__restrict__ inc, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
virtual void initializeDataBuffers(VBStore &vbs)=0
VisibilityResamplerBase & operator=(const VisibilityResamplerBase &other)
measure the time it takes to execute parts of a program
virtual void setPATolerance(const double &dPA)=0
VBRow2CFBMapType & getVBRow2CFBMap()
void initializeToSky(const casacore::Array< casacore::DComplex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
virtual void GridToData(VBStore &vbs, const casacore::Array< casacore::Complex > &griddedData)=0
void finalizeToSky(casacore::Array< casacore::Complex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
casacore::Vector< casacore::Int > polMap_p
casacore::Complex getFrom4DArray(const casacore::Complex *__restrict__ &store, const casacore::Int *__restrict__ &iPos)
The following two methods are called in the innermost loop.
casacore::Vector< casacore::Double > dphase_p
casacore::Vector< casacore::Double > offset_p
casacore::Double runTimeG1_p
virtual ~VisibilityResamplerBase()
virtual void releaseBuffers()=0
casacore::DComplex getFrom4DArray(const casacore::DComplex *__restrict__ &store, const casacore::Int *__restrict__ &iPos)
restrict
virtual void initializePutBuffers(const casacore::Array< casacore::DComplex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)=0
virtual casacore::Int makeVBRow2CFMap(CFStore2 &cfs, ConvolutionFunction &cf, const VisBuffer &vb, const casacore::Quantity &dPA, const casacore::Vector< casacore::Int > &dataChan2ImChanMap, const casacore::Vector< casacore::Int > &dataPol2ImPolMap, const casacore::Vector< casacore::Double > &pointingOffset)
void cacheAxisIncrements(const casacore::Int &n0, const casacore::Int &n1, const casacore::Int &n2, const casacore::Int &n3)
casacore::Array assignment operator in CASACore requires lhs.nelements() == 0 or lhs.nelements()=rhs.nelements() template <class t>=""> inline void SETVEC(casacore::Vector<T>& lhs, const casacore::Vector<T>& rhs) {lhs.resize(rhs.shape()); lhs = rhs;};
VisBuffers encapsulate one chunk of visibility data for processing.
VBRow2CFMapType vbRow2CFMap_p
casacore::Double runTimeDG_p
void addTo4DArray(casacore::Complex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
virtual void setMaps(const casacore::Vector< casacore::Int > &chanMap, const casacore::Vector< casacore::Int > &polMap)=0
void resize(size_t len, Bool copyValues=False)
casacore::Double runTimeG3_p
virtual void copy(const VisibilityResamplerBase &other)
virtual void setCFMaps(const casacore::Vector< casacore::Int > &cfMap, const casacore::Vector< casacore::Int > &conjCFMap)=0
casacore::Double runTimeG7_p
virtual VisibilityResamplerBase * clone()=0
void cacheAxisIncrements(const casacore::Vector< casacore::Int > &n)
void addTo4DArray(casacore::DComplex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Int *__restrict__ inc, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
Version where inc_p is supplied from outside.
virtual void DataToGrid(casacore::Array< casacore::DComplex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool useConjFreqCF=false)=0
casacore::Complex getFrom4DArray(const casacore::Complex *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Vector< casacore::Int > &inc)
restrict
casacore::Double runTimeG5_p