casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casa::refim::VisibilityResampler Class Reference

#include <VisibilityResampler.h>

Inheritance diagram for casa::refim::VisibilityResampler:
casa::refim::VisibilityResamplerBase casa::refim::AWVisResampler

Public Member Functions

 VisibilityResampler ()
 
 VisibilityResampler (const VisibilityResampler &other)
 VisibilityResampler(const CFStore& cfs): VisibilityResamplerBase(cfs) {};. More...
 
virtual ~VisibilityResampler ()
 {setConvFunc(cfs);}; More...
 
void copy (const VisibilityResamplerBase &other)
 VisibilityResampler& operator=(const VisibilityResampler& other);. More...
 
virtual VisibilityResamplerBaseclone ()
 
virtual void getParams (casacore::Vector< casacore::Double > &uvwScale, casacore::Vector< casacore::Double > &offset, casacore::Vector< casacore::Double > &dphase)
 
virtual void setParams (const casacore::Vector< casacore::Double > &uvwScale, const casacore::Vector< casacore::Double > &offset, const casacore::Vector< casacore::Double > &dphase)
 
virtual void setMaps (const casacore::Vector< casacore::Int > &chanMap, const casacore::Vector< casacore::Int > &polMap)
 
virtual void setFreqMaps (const casacore::Matrix< casacore::Double > &spwChanFreqs, const casacore::Matrix< casacore::Double > &spwChanConjFreqs)
 
virtual void setConvFunc (const CFStore &cfs)
 
virtual void setCFMaps (const casacore::Vector< casacore::Int > &cfMap, const casacore::Vector< casacore::Int > &conjCFMap)
 
virtual void setPATolerance (const double &dPA)
 
virtual void DataToGrid (casacore::Array< casacore::DComplex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool=false)
 
More...
 
virtual void DataToGrid (casacore::Array< casacore::Complex > &griddedData, VBStore &vbs, casacore::Matrix< casacore::Double > &sumwt, const casacore::Bool &dopsf, casacore::Bool=false)
 
virtual void GridToData (VBStore &vbs, const casacore::Array< casacore::Complex > &griddedData)
 
More...
 
virtual void ComputeResiduals (VBStore &vbs)
 virtual void GridToData(VBStore& vbs, casacore::Array<casacore::Complex>& griddedData); More...
 
virtual void setMutex (async::Mutex *mu)
 
virtual void init (const casacore::Bool &doublePrecision)
 Genealogical baggage – required for the MultiThreadedVisibilityResampler – that everyone else has to carray around. More...
 
virtual void GatherGrids (casacore::Array< casacore::DComplex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
 
virtual void GatherGrids (casacore::Array< casacore::Complex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
 
virtual void initializePutBuffers (const casacore::Array< casacore::DComplex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
 
virtual void initializePutBuffers (const casacore::Array< casacore::Complex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
 
virtual void initializeDataBuffers (VBStore &vbs)
 
virtual void releaseBuffers ()
 
- Public Member Functions inherited from casa::refim::VisibilityResamplerBase
 VisibilityResamplerBase ()
 
 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);};. More...
 
virtual ~VisibilityResamplerBase ()
 
VisibilityResamplerBaseoperator= (const VisibilityResamplerBase &other)
 
void finalizeToSky (casacore::Array< casacore::DComplex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
 Aliases for more readable code at the FTMachine layer. More...
 
void finalizeToSky (casacore::Array< casacore::Complex > &griddedData, casacore::Matrix< casacore::Double > &sumwt)
 
void initializeToSky (const casacore::Array< casacore::DComplex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
 
void initializeToSky (const casacore::Array< casacore::Complex > &griddedData, const casacore::Matrix< casacore::Double > &sumwt)
 
const casacore::Vector
< casacore::Int
getCFMap ()
 
const casacore::Vector
< casacore::Int
getConjCFMap ()
 
VB2CFBMapgetVBRow2CFBMap ()
 VBRow2CFMapType& getVBRow2CFMap() {return vbRow2CFMap_p;};. More...
 
void setFieldPhaseGrad (const casacore::Matrix< casacore::Complex > &phaseGrad)
 virtual casacore::Int makeVBRow2CFBMap(CFStore2& cfs, ConvolutionFunction& cf, const VisBuffer2& vb, const casacore::Quantity& dPA, const casacore::Vector<casacore::Int>& dataChan2ImChanMap, const casacore::Vector<casacore::Int>& dataPol2ImPolMap, const casacore::Vector<casacore::Double>& pointingOffset); More...
 
void setVB2CFMap (const casacore::CountedPtr< refim::VB2CFBMap > &thisMap)
 

Protected Member Functions

template<class T >
void DataToGridImpl_p (casacore::Array< T > &griddedData, VBStore &vb, const casacore::Bool &dopsf, casacore::Matrix< casacore::Double > &sumwt, casacore::Bool useConjFreqCF=false)
 casacore::Vector<casacore::Double> uvwScale_p, offset_p, dphase_p; casacore::Vector<casacore::Int> chanMap_p, polMap_p; CFStore convFuncStore_p; casacore::Int inc0_p, inc1_p, inc2_p, inc3_p; More...
 
void cacheAxisIncrements (casacore::Int &n0, casacore::Int &n1, casacore::Int &n2, casacore::Int &n3)
 void sgrid(casacore::Vector<casacore::Double>& pos, casacore::Vector<casacore::Int>& loc, casacore::Vector<casacore::Int>& 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); More...
 
casacore::Complex getFrom4DArray (const casacore::Complex *__restrict__ store, const casacore::Int *__restrict__ iPos) __restrict__
 The following two methods are called in the innermost loop. More...
 
template<class T >
void addTo4DArray (T *__restrict__ store, const casacore::Int *__restrict__ iPos, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
 
- Protected Member Functions inherited from casa::refim::VisibilityResamplerBase
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::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__
 
casacore::Bool onGrid (const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &loc0, const casacore::Int &loc1, const casacore::Int &support) __restrict__
 
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;}; More...
 
void cacheAxisIncrements (const casacore::Vector< casacore::Int > &n)
 
void cacheAxisIncrements (const casacore::Vector< casacore::Int > &n, casacore::Vector< casacore::Int > &inc)
 
void cacheAxisIncrements (const casacore::Int n[4], casacore::Int inc[4])
 
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>=""> More...
 
void addTo4DArray (casacore::Complex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
 
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. More...
 
void addTo4DArray (casacore::Complex *__restrict__ &store, casacore::Int *__restrict__ &iPos, casacore::Int *__restrict__ inc, casacore::Complex &nvalue, casacore::Double &wt) __restrict__
 
casacore::Complex getFrom4DArray (const casacore::Complex *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Vector< casacore::Int > &inc)
 restrict More...
 
casacore::Complex getFrom4DArray (const casacore::Complex *__restrict__ &store, const casacore::Vector< casacore::Int > iPos, const casacore::Vector< casacore::Int > &inc)
 restrict More...
 
casacore::DComplex getFrom4DArray (const casacore::DComplex *__restrict__ &store, const casacore::Int *__restrict__ &iPos, const casacore::Vector< casacore::Int > &inc)
 restrict More...
 
casacore::DComplex getFrom4DArray (const casacore::DComplex *__restrict__ &store, const casacore::Vector< casacore::Int > iPos, const casacore::Vector< casacore::Int > &inc)
 restrict More...
 
casacore::Complex getFrom4DArray (const casacore::Complex *__restrict__ &store, const casacore::Int *__restrict__ &iPos)
 The following two methods are called in the innermost loop. More...
 
casacore::DComplex getFrom4DArray (const casacore::DComplex *__restrict__ &store, const casacore::Int *__restrict__ &iPos)
 restrict More...
 

Protected Attributes

async::MutexmyMutex_p
 

-------------------------—Private parts----------------------------------—

More...
 
- Protected Attributes inherited from casa::refim::VisibilityResamplerBase
casacore::Vector
< casacore::Double
uvwScale_p
 

-------------------------—Private parts----------------------------------—

More...
 
casacore::Vector
< casacore::Double
offset_p
 
casacore::Vector
< casacore::Double
dphase_p
 
casacore::Vector< casacore::IntchanMap_p
 
casacore::Vector< casacore::IntpolMap_p
 
casacore::Matrix
< casacore::Double
spwChanFreq_p
 
casacore::Matrix
< casacore::Double
spwChanConjFreq_p
 
CFStore convFuncStore_p
 
casacore::Vector< casacore::Intinc_p
 casacore::Int inc0_p, inc1_p, inc2_p, inc3_p; More...
 
casacore::Int *__restrict__ incPtr_p
 
casacore::Vector< casacore::IntcfMap_p
 
casacore::Vector< casacore::IntconjCFMap_p
 
double paTolerance_p
 VBRow2CFMapType vbRow2CFMap_p;. More...
 
casacore::Matrix
< casacore::Complex > 
cached_phaseGrad_p
 
casacore::CountedPtr
< refim::VB2CFBMap
vb2CFBMap_p
 

Additional Inherited Members

- Public Attributes inherited from casa::refim::VisibilityResamplerBase
casacore::Double runTimeG_p
 
casacore::Double runTimeDG_p
 
casacore::Double runTimeG1_p
 
casacore::Double runTimeG2_p
 
casacore::Double runTimeG3_p
 
casacore::Double runTimeG4_p
 
casacore::Double runTimeG5_p
 
casacore::Double runTimeG6_p
 
casacore::Double runTimeG7_p
 
casacore::Timer timer_p
 

Detailed Description

Definition at line 47 of file VisibilityResampler.h.

Constructor & Destructor Documentation

casa::refim::VisibilityResampler::VisibilityResampler ( )
inline

Definition at line 50 of file VisibilityResampler.h.

Referenced by clone().

casa::refim::VisibilityResampler::VisibilityResampler ( const VisibilityResampler other)
inline

VisibilityResampler(const CFStore& cfs): VisibilityResamplerBase(cfs) {};.

Definition at line 52 of file VisibilityResampler.h.

References copy().

virtual casa::refim::VisibilityResampler::~VisibilityResampler ( )
inlinevirtual

{setConvFunc(cfs);};

Definition at line 56 of file VisibilityResampler.h.

Member Function Documentation

template<class T >
void casa::refim::VisibilityResampler::addTo4DArray ( T *__restrict__  store,
const casacore::Int *__restrict__  iPos,
casacore::Complex &  nvalue,
casacore::Double wt 
)
inlineprotected

Definition at line 215 of file VisibilityResampler.h.

void casa::refim::VisibilityResampler::cacheAxisIncrements ( casacore::Int n0,
casacore::Int n1,
casacore::Int n2,
casacore::Int n3 
)
inlineprotected

void sgrid(casacore::Vector<casacore::Double>& pos, casacore::Vector<casacore::Int>& loc, casacore::Vector<casacore::Int>& 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);

Definition at line 205 of file VisibilityResampler.h.

virtual VisibilityResamplerBase* casa::refim::VisibilityResampler::clone ( )
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Reimplemented in casa::refim::AWVisResampler.

Definition at line 63 of file VisibilityResampler.h.

References VisibilityResampler().

virtual void casa::refim::VisibilityResampler::ComputeResiduals ( VBStore vbs)
virtual

virtual void GridToData(VBStore& vbs, casacore::Array<casacore::Complex>& griddedData);

Implements casa::refim::VisibilityResamplerBase.

void casa::refim::VisibilityResampler::copy ( const VisibilityResamplerBase other)
inlinevirtual

VisibilityResampler& operator=(const VisibilityResampler& other);.

Reimplemented from casa::refim::VisibilityResamplerBase.

Definition at line 60 of file VisibilityResampler.h.

References casa::refim::VisibilityResamplerBase::copy().

Referenced by casa::refim::AWVisResampler::copy(), and VisibilityResampler().

virtual void casa::refim::VisibilityResampler::DataToGrid ( casacore::Array< casacore::DComplex > &  griddedData,
VBStore vbs,
casacore::Matrix< casacore::Double > &  sumwt,
const casacore::Bool dopsf,
casacore::Bool  = false 
)
inlinevirtual


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.

Implements casa::refim::VisibilityResamplerBase.

Reimplemented in casa::refim::AWVisResampler.

Definition at line 108 of file VisibilityResampler.h.

References DataToGridImpl_p().

virtual void casa::refim::VisibilityResampler::DataToGrid ( casacore::Array< casacore::Complex > &  griddedData,
VBStore vbs,
casacore::Matrix< casacore::Double > &  sumwt,
const casacore::Bool dopsf,
casacore::Bool  = false 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Reimplemented in casa::refim::AWVisResampler.

Definition at line 113 of file VisibilityResampler.h.

References DataToGridImpl_p().

template<class T >
void casa::refim::VisibilityResampler::DataToGridImpl_p ( casacore::Array< T > &  griddedData,
VBStore vb,
const casacore::Bool dopsf,
casacore::Matrix< casacore::Double > &  sumwt,
casacore::Bool  useConjFreqCF = false 
)
protected

casacore::Vector<casacore::Double> uvwScale_p, offset_p, dphase_p; casacore::Vector<casacore::Int> chanMap_p, polMap_p; CFStore convFuncStore_p; casacore::Int inc0_p, inc1_p, inc2_p, inc3_p;

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

Referenced by DataToGrid().

virtual void casa::refim::VisibilityResampler::GatherGrids ( casacore::Array< casacore::DComplex > &  griddedData,
casacore::Matrix< casacore::Double > &  sumwt 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 136 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::GatherGrids ( casacore::Array< casacore::Complex > &  griddedData,
casacore::Matrix< casacore::Double > &  sumwt 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 137 of file VisibilityResampler.h.

casacore::Complex casa::refim::VisibilityResampler::getFrom4DArray ( const casacore::Complex *__restrict__  store,
const casacore::Int *__restrict__  iPos 
)
inlineprotected

The following two methods are called in the innermost loop.

Definition at line 210 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::getParams ( casacore::Vector< casacore::Double > &  uvwScale,
casacore::Vector< casacore::Double > &  offset,
casacore::Vector< casacore::Double > &  dphase 
)
inlinevirtual
virtual void casa::refim::VisibilityResampler::GridToData ( VBStore vbs,
const casacore::Array< casacore::Complex > &  griddedData 
)
virtual


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

Implements casa::refim::VisibilityResamplerBase.

Reimplemented in casa::refim::AWVisResampler.

virtual void casa::refim::VisibilityResampler::init ( const casacore::Bool doublePrecision)
inlinevirtual

Genealogical baggage – required for the MultiThreadedVisibilityResampler – that everyone else has to carray around.

These are no-ops for unithreaded samplers.

Implements casa::refim::VisibilityResamplerBase.

Definition at line 135 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::initializeDataBuffers ( VBStore vbs)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 142 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::initializePutBuffers ( const casacore::Array< casacore::DComplex > &  griddedData,
const casacore::Matrix< casacore::Double > &  sumwt 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 138 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::initializePutBuffers ( const casacore::Array< casacore::Complex > &  griddedData,
const casacore::Matrix< casacore::Double > &  sumwt 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 140 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::releaseBuffers ( )
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Definition at line 145 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::setCFMaps ( const casacore::Vector< casacore::Int > &  cfMap,
const casacore::Vector< casacore::Int > &  conjCFMap 
)
inlinevirtual

Implements casa::refim::VisibilityResamplerBase.

Reimplemented in casa::refim::AWVisResampler.

Definition at line 97 of file VisibilityResampler.h.

virtual void casa::refim::VisibilityResampler::setConvFunc ( const CFStore cfs)
inlinevirtual
virtual void casa::refim::VisibilityResampler::setFreqMaps ( const casacore::Matrix< casacore::Double > &  spwChanFreqs,
const casacore::Matrix< casacore::Double > &  spwChanConjFreqs 
)
inlinevirtual
virtual void casa::refim::VisibilityResampler::setMaps ( const casacore::Vector< casacore::Int > &  chanMap,
const casacore::Vector< casacore::Int > &  polMap 
)
inlinevirtual

SynthesisUtils::SETVEC(chanMap_p,chanMap); SynthesisUtils::SETVEC(polMap_p,polMap);

Implements casa::refim::VisibilityResamplerBase.

Definition at line 79 of file VisibilityResampler.h.

References casa::refim::VisibilityResamplerBase::chanMap_p, casa::refim::VisibilityResamplerBase::polMap_p, and casacore::Vector< T >::reference().

virtual void casa::refim::VisibilityResampler::setMutex ( async::Mutex mu)
inlinevirtual

Definition at line 127 of file VisibilityResampler.h.

References atm::constants::mu, and myMutex_p.

virtual void casa::refim::VisibilityResampler::setParams ( const casacore::Vector< casacore::Double > &  uvwScale,
const casacore::Vector< casacore::Double > &  offset,
const casacore::Vector< casacore::Double > &  dphase 
)
inlinevirtual

SynthesisUtils::SETVEC(uvwScale_p, uvwScale); SynthesisUtils::SETVEC(offset_p, offset); SynthesisUtils::SETVEC(dphase_p, dphase);

Implements casa::refim::VisibilityResamplerBase.

Definition at line 68 of file VisibilityResampler.h.

References casa::refim::VisibilityResamplerBase::dphase_p, casa::refim::VisibilityResamplerBase::offset_p, casacore::Vector< T >::reference(), and casa::refim::VisibilityResamplerBase::uvwScale_p.

virtual void casa::refim::VisibilityResampler::setPATolerance ( const double &  dPA)
inlinevirtual

Member Data Documentation

async::Mutex* casa::refim::VisibilityResampler::myMutex_p
protected


-------------------------—Private parts----------------------------------—

Definition at line 145 of file VisibilityResampler.h.

Referenced by setMutex().


The documentation for this class was generated from the following file: