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

#include <MSUVBin.h>

Public Member Functions

 MSUVBin ()
 
 MSUVBin (const casacore::MDirection &phaseCenter, const casacore::Int nx, const casacore::Int ny, const casacore::Int nchan, const casacore::Int npol, casacore::Quantity cellx, casacore::Quantity celly, casacore::Quantity freqStart, casacore::Quantity freqStep, casacore::Float memFraction=0.5, casacore::Bool dow=false, casacore::Bool doflag=false)
 npol should be only 1, 2 (parallel hands) or 4 More...
 
 MSUVBin (casacore::MeasurementSet &ms)
 Constructor to bin into an existing gridded ms. More...
 
virtual casacore::Bool selectData (const casacore::String &msname, const casacore::String &spw="", const casacore::String &field="", const casacore::String &baseline="", const casacore::String &scan="", const casacore::String &uvrange="", const casacore::String &taql="", const casacore::String &subarray="", const casacore::String &correlation="", const casacore::String &intent="", const casacore::String &obs="")
 The following can be called multiple times to setup multiple input MS. More...
 
void setOutputMS (const casacore::String &msname)
 void setInputMS(const casacore::MeasurementSet& ms); void setInputMS(const casacore::Block<const casacore::MeasurementSet*> mssPtr); More...
 
casacore::Bool fillOutputMS ()
 forceDiskUsage is to avoid using in memory gridding even if there is More...
 
virtual ~MSUVBin ()
 

Static Public Member Functions

static casacore::Bool String2MDirection (const casacore::String &theString, casacore::MDirection &theMeas, const casacore::String msname="")
 Helper function for creating casacore::MDirection from a string. More...
 

Private Member Functions

casacore::Bool fillSmallOutputMS ()
 
casacore::Bool fillNewBigOutputMS ()
 
casacore::Bool fillBigOutputMS ()
 
casacore::Int recoverGridInfo (const casacore::String &msname)
 
void storeGridInfo ()
 
void createOutputMS (const casacore::Int nrrows)
 
casacore::Int makeUVW (const casacore::Double reffreq, casacore::Vector< casacore::Double > &incr, casacore::Vector< casacore::Int > &cent, casacore::Matrix< casacore::Double > &uvw)
 
void locateuvw (casacore::Matrix< casacore::Int > &locuv, const casacore::Vector< casacore::Double > &increment, const casacore::Vector< casacore::Int > &center, const casacore::Matrix< casacore::Double > &uvw)
 
void gridData (const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &grid, casacore::Matrix< casacore::Float > &wght, casacore::Cube< casacore::Float > &wghtSpec, casacore::Cube< casacore::Bool > &flag, casacore::Vector< casacore::Bool > &rowFlag, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Int > &ant1, casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &time, const casacore::Matrix< casacore::Int > &locuv)
 
void gridData (const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &grid, casacore::Matrix< casacore::Float > &wght, casacore::Cube< casacore::Float > &wghtSpec, casacore::Cube< casacore::Bool > &flag, casacore::Vector< casacore::Bool > &rowFlag, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Int > &ant1, casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &time, const casacore::Int startchan, const casacore::Int endchan)
 
void gridDataConv (const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &grid, casacore::Matrix< casacore::Float > &, casacore::Cube< casacore::Complex > &wghtSpec, casacore::Cube< casacore::Bool > &flag, casacore::Vector< casacore::Bool > &rowFlag, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Int > &ant1, casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &timeCen, const casacore::Int startchan, const casacore::Int endchan, const casacore::Cube< casacore::Complex > &convFunc, const casacore::Vector< casacore::Int > &convSupport, const casacore::Double wScale, const casacore::Int convSampling)
 
void gridDataConvThr (const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &grid, casacore::Cube< casacore::Complex > &wghtSpec, casacore::Cube< casacore::Bool > &flag, casacore::Vector< casacore::Bool > &rowFlag, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Int > &ant1, casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &timeCen, const casacore::Int startchan, const casacore::Int endchan, const casacore::Cube< casacore::Complex > &convFunc, const casacore::Vector< casacore::Int > &convSupport, const casacore::Double wScale, const casacore::Int convSampling)
 
void inplaceGridData (const vi::VisBuffer2 &vb)
 
void inplaceLargeBW (const vi::VisBuffer2 &vb)
 
void inplaceSmallBW (const vi::VisBuffer2 &vb)
 
void makeCoordsys ()
 
void weightSync ()
 
void multiThrLoop (const casacore::Int outchan, const vi::VisBuffer2 &vb, casacore::Double refFreq, casacore::Vector< casacore::Float > scale, casacore::Bool hasCorrected, casacore::Bool needRot, const casacore::Vector< casacore::Double > &phasor, const casacore::Vector< casacore::Double > &visFreq, const casacore::Double &fracbw, casacore::Complex *&grid, casacore::Complex *&wghtSpec, casacore::Bool *&flag, casacore::Bool *&rowFlag, casacore::Double *&uvw, casacore::Int *&ant1, casacore::Int *&ant2, casacore::Double *&timeCen, casacore::Double *&sumWeight, casacore::Double *&numvis, const casacore::Int startchan, const casacore::Int endchan, const casacore::Cube< casacore::Complex > &convFunc, const casacore::Vector< casacore::Int > &convSupport, const casacore::Double wScale, const casacore::Int convSampling)
 
void locateFlagFromGrid (vi::VisBuffer2 &vb, casacore::Cube< casacore::Bool > &datFlag, casacore::Cube< casacore::Float > &wghtSpec, casacore::Cube< casacore::Bool > &flag, casacore::Vector< casacore::Bool > &rowFlag, casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Int > &ant1, casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &timeCen, const casacore::Int startchan, const casacore::Int endchan)
 
casacore::Bool datadescMap (const vi::VisBuffer2 &vb, casacore::Double &fracbw)
 returns a false if either no channel map or pol map onto grid More...
 
casacore::Bool datadescMap (const VisBuffer &vb)
 
casacore::Bool saveData (const casacore::Cube< casacore::Complex > &grid, const casacore::Cube< casacore::Bool > &flag, const casacore::Vector< casacore::Bool > &rowFlag, const casacore::Cube< casacore::Float > &wghtSpec, const casacore::Matrix< casacore::Float > &wght, const casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Int > &ant1, const casacore::Vector< casacore::Int > &ant2, const casacore::Vector< casacore::Double > &time)
 
casacore::Bool saveData (const casacore::Cube< casacore::Complex > &grid, const casacore::Cube< casacore::Bool > &flag, const casacore::Vector< casacore::Bool > &rowFlag, const casacore::Cube< casacore::Float > &wghtSpec, const casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Int > &ant1, const casacore::Vector< casacore::Int > &ant2, const casacore::Vector< casacore::Double > &time, const casacore::Int startchan, const casacore::Int endchan, const casacore::Cube< casacore::Float > &imagwghtSpec=casacore::Cube< casacore::Float >())
 
void fillSubTables ()
 
void fillFieldTable ()
 
void copySubtable (const casacore::String &tabName, const casacore::Table &inTab, const casacore::Bool noRows=false)
 
void fillDDTables ()
 
void setTileCache ()
 
void makeSFConv (casacore::Cube< casacore::Complex > &convFunc, casacore::Vector< casacore::Int > &convSupport, casacore::Double &wScale, casacore::Int &convSampling, casacore::Int &convSize)
 
void makeWConv (vi::VisibilityIterator2 &iter, casacore::Cube< casacore::Complex > &convFunc, casacore::Vector< casacore::Int > &convSupport, casacore::Double &wScale, casacore::Int &convSampling, casacore::Int &convSize)
 

Static Private Member Functions

static casacore::Int sepCommaEmptyToVectorStrings (casacore::Vector< casacore::String > &retStr, const casacore::String &str)
 

Private Attributes

casacore::CoordinateSystem csys_p
 
casacore::Int nx_p
 
casacore::Int ny_p
 
casacore::Int nchan_p
 
casacore::Int npol_p
 
casacore::Double freqStart_p
 
casacore::Double freqStep_p
 
casacore::Vector< casacore::IntchanMap_p
 
casacore::Vector< casacore::IntpolMap_p
 
casacore::Vector
< casacore::Vector
< casacore::Int > > 
chanMapRev_p
 
casacore::MDirection phaseCenter_p
 
casacore::Vector
< casacore::Double
deltas_p
 
casacore::Vector< casacore::IntwhichStokes_p
 
casacore::Bool existOut_p
 
casacore::String outMSName_p
 
casacore::CountedPtr
< casacore::MeasurementSet
outMsPtr_p
 
casacore::Block< const
casacore::MeasurementSet * > 
mss_p
 
VisBufferUtil vbutil_p
 
casacore::Float memFraction_p
 
casacore::Bool doW_p
 
casacore::Bool doFlag_p
 
casacore::Matrix
< casacore::Double
numVis_p
 
casacore::Matrix
< casacore::Double
sumWeight_p
 

Detailed Description

Definition at line 46 of file MSUVBin.h.

Constructor & Destructor Documentation

casa::MSUVBin::MSUVBin ( )
casa::MSUVBin::MSUVBin ( const casacore::MDirection phaseCenter,
const casacore::Int  nx,
const casacore::Int  ny,
const casacore::Int  nchan,
const casacore::Int  npol,
casacore::Quantity  cellx,
casacore::Quantity  celly,
casacore::Quantity  freqStart,
casacore::Quantity  freqStep,
casacore::Float  memFraction = 0.5,
casacore::Bool  dow = false,
casacore::Bool  doflag = false 
)

npol should be only 1, 2 (parallel hands) or 4

casa::MSUVBin::MSUVBin ( casacore::MeasurementSet ms)

Constructor to bin into an existing gridded ms.

virtual casa::MSUVBin::~MSUVBin ( )
virtual

Member Function Documentation

void casa::MSUVBin::copySubtable ( const casacore::String tabName,
const casacore::Table inTab,
const casacore::Bool  noRows = false 
)
private
void casa::MSUVBin::createOutputMS ( const casacore::Int  nrrows)
private
casacore::Bool casa::MSUVBin::datadescMap ( const vi::VisBuffer2 vb,
casacore::Double fracbw 
)
private

returns a false if either no channel map or pol map onto grid

casacore::Bool casa::MSUVBin::datadescMap ( const VisBuffer vb)
private
casacore::Bool casa::MSUVBin::fillBigOutputMS ( )
private
void casa::MSUVBin::fillDDTables ( )
private
void casa::MSUVBin::fillFieldTable ( )
private
casacore::Bool casa::MSUVBin::fillNewBigOutputMS ( )
private
casacore::Bool casa::MSUVBin::fillOutputMS ( )

forceDiskUsage is to avoid using in memory gridding even if there is

casacore::Bool casa::MSUVBin::fillSmallOutputMS ( )
private
void casa::MSUVBin::fillSubTables ( )
private
void casa::MSUVBin::gridData ( const vi::VisBuffer2 vb,
casacore::Cube< casacore::Complex > &  grid,
casacore::Matrix< casacore::Float > &  wght,
casacore::Cube< casacore::Float > &  wghtSpec,
casacore::Cube< casacore::Bool > &  flag,
casacore::Vector< casacore::Bool > &  rowFlag,
casacore::Matrix< casacore::Double > &  uvw,
casacore::Vector< casacore::Int > &  ant1,
casacore::Vector< casacore::Int > &  ant2,
casacore::Vector< casacore::Double > &  time,
const casacore::Matrix< casacore::Int > &  locuv 
)
private
void casa::MSUVBin::gridData ( const vi::VisBuffer2 vb,
casacore::Cube< casacore::Complex > &  grid,
casacore::Matrix< casacore::Float > &  wght,
casacore::Cube< casacore::Float > &  wghtSpec,
casacore::Cube< casacore::Bool > &  flag,
casacore::Vector< casacore::Bool > &  rowFlag,
casacore::Matrix< casacore::Double > &  uvw,
casacore::Vector< casacore::Int > &  ant1,
casacore::Vector< casacore::Int > &  ant2,
casacore::Vector< casacore::Double > &  time,
const casacore::Int  startchan,
const casacore::Int  endchan 
)
private
void casa::MSUVBin::gridDataConv ( const vi::VisBuffer2 vb,
casacore::Cube< casacore::Complex > &  grid,
casacore::Matrix< casacore::Float > &  ,
casacore::Cube< casacore::Complex > &  wghtSpec,
casacore::Cube< casacore::Bool > &  flag,
casacore::Vector< casacore::Bool > &  rowFlag,
casacore::Matrix< casacore::Double > &  uvw,
casacore::Vector< casacore::Int > &  ant1,
casacore::Vector< casacore::Int > &  ant2,
casacore::Vector< casacore::Double > &  timeCen,
const casacore::Int  startchan,
const casacore::Int  endchan,
const casacore::Cube< casacore::Complex > &  convFunc,
const casacore::Vector< casacore::Int > &  convSupport,
const casacore::Double  wScale,
const casacore::Int  convSampling 
)
private
void casa::MSUVBin::gridDataConvThr ( const vi::VisBuffer2 vb,
casacore::Cube< casacore::Complex > &  grid,
casacore::Cube< casacore::Complex > &  wghtSpec,
casacore::Cube< casacore::Bool > &  flag,
casacore::Vector< casacore::Bool > &  rowFlag,
casacore::Matrix< casacore::Double > &  uvw,
casacore::Vector< casacore::Int > &  ant1,
casacore::Vector< casacore::Int > &  ant2,
casacore::Vector< casacore::Double > &  timeCen,
const casacore::Int  startchan,
const casacore::Int  endchan,
const casacore::Cube< casacore::Complex > &  convFunc,
const casacore::Vector< casacore::Int > &  convSupport,
const casacore::Double  wScale,
const casacore::Int  convSampling 
)
private
void casa::MSUVBin::inplaceGridData ( const vi::VisBuffer2 vb)
private
void casa::MSUVBin::inplaceLargeBW ( const vi::VisBuffer2 vb)
private
void casa::MSUVBin::inplaceSmallBW ( const vi::VisBuffer2 vb)
private
void casa::MSUVBin::locateFlagFromGrid ( vi::VisBuffer2 vb,
casacore::Cube< casacore::Bool > &  datFlag,
casacore::Cube< casacore::Float > &  wghtSpec,
casacore::Cube< casacore::Bool > &  flag,
casacore::Vector< casacore::Bool > &  rowFlag,
casacore::Matrix< casacore::Double > &  uvw,
casacore::Vector< casacore::Int > &  ant1,
casacore::Vector< casacore::Int > &  ant2,
casacore::Vector< casacore::Double > &  timeCen,
const casacore::Int  startchan,
const casacore::Int  endchan 
)
private
void casa::MSUVBin::locateuvw ( casacore::Matrix< casacore::Int > &  locuv,
const casacore::Vector< casacore::Double > &  increment,
const casacore::Vector< casacore::Int > &  center,
const casacore::Matrix< casacore::Double > &  uvw 
)
private
void casa::MSUVBin::makeCoordsys ( )
private
void casa::MSUVBin::makeSFConv ( casacore::Cube< casacore::Complex > &  convFunc,
casacore::Vector< casacore::Int > &  convSupport,
casacore::Double wScale,
casacore::Int convSampling,
casacore::Int convSize 
)
private
casacore::Int casa::MSUVBin::makeUVW ( const casacore::Double  reffreq,
casacore::Vector< casacore::Double > &  incr,
casacore::Vector< casacore::Int > &  cent,
casacore::Matrix< casacore::Double > &  uvw 
)
private
void casa::MSUVBin::makeWConv ( vi::VisibilityIterator2 iter,
casacore::Cube< casacore::Complex > &  convFunc,
casacore::Vector< casacore::Int > &  convSupport,
casacore::Double wScale,
casacore::Int convSampling,
casacore::Int convSize 
)
private
void casa::MSUVBin::multiThrLoop ( const casacore::Int  outchan,
const vi::VisBuffer2 vb,
casacore::Double  refFreq,
casacore::Vector< casacore::Float scale,
casacore::Bool  hasCorrected,
casacore::Bool  needRot,
const casacore::Vector< casacore::Double > &  phasor,
const casacore::Vector< casacore::Double > &  visFreq,
const casacore::Double fracbw,
casacore::Complex *&  grid,
casacore::Complex *&  wghtSpec,
casacore::Bool *&  flag,
casacore::Bool *&  rowFlag,
casacore::Double *&  uvw,
casacore::Int *&  ant1,
casacore::Int *&  ant2,
casacore::Double *&  timeCen,
casacore::Double *&  sumWeight,
casacore::Double *&  numvis,
const casacore::Int  startchan,
const casacore::Int  endchan,
const casacore::Cube< casacore::Complex > &  convFunc,
const casacore::Vector< casacore::Int > &  convSupport,
const casacore::Double  wScale,
const casacore::Int  convSampling 
)
private
casacore::Int casa::MSUVBin::recoverGridInfo ( const casacore::String msname)
private
casacore::Bool casa::MSUVBin::saveData ( const casacore::Cube< casacore::Complex > &  grid,
const casacore::Cube< casacore::Bool > &  flag,
const casacore::Vector< casacore::Bool > &  rowFlag,
const casacore::Cube< casacore::Float > &  wghtSpec,
const casacore::Matrix< casacore::Float > &  wght,
const casacore::Matrix< casacore::Double > &  uvw,
const casacore::Vector< casacore::Int > &  ant1,
const casacore::Vector< casacore::Int > &  ant2,
const casacore::Vector< casacore::Double > &  time 
)
private
casacore::Bool casa::MSUVBin::saveData ( const casacore::Cube< casacore::Complex > &  grid,
const casacore::Cube< casacore::Bool > &  flag,
const casacore::Vector< casacore::Bool > &  rowFlag,
const casacore::Cube< casacore::Float > &  wghtSpec,
const casacore::Matrix< casacore::Double > &  uvw,
const casacore::Vector< casacore::Int > &  ant1,
const casacore::Vector< casacore::Int > &  ant2,
const casacore::Vector< casacore::Double > &  time,
const casacore::Int  startchan,
const casacore::Int  endchan,
const casacore::Cube< casacore::Float > &  imagwghtSpec = casacore::Cubecasacore::Float >() 
)
private
virtual casacore::Bool casa::MSUVBin::selectData ( const casacore::String msname,
const casacore::String spw = "",
const casacore::String field = "",
const casacore::String baseline = "",
const casacore::String scan = "",
const casacore::String uvrange = "",
const casacore::String taql = "",
const casacore::String subarray = "",
const casacore::String correlation = "",
const casacore::String intent = "",
const casacore::String obs = "" 
)
virtual

The following can be called multiple times to setup multiple input MS.

static casacore::Int casa::MSUVBin::sepCommaEmptyToVectorStrings ( casacore::Vector< casacore::String > &  retStr,
const casacore::String str 
)
staticprivate
void casa::MSUVBin::setOutputMS ( const casacore::String msname)

void setInputMS(const casacore::MeasurementSet& ms); void setInputMS(const casacore::Block<const casacore::MeasurementSet*> mssPtr);

void casa::MSUVBin::setTileCache ( )
private
void casa::MSUVBin::storeGridInfo ( )
private
static casacore::Bool casa::MSUVBin::String2MDirection ( const casacore::String theString,
casacore::MDirection theMeas,
const casacore::String  msname = "" 
)
static

Helper function for creating casacore::MDirection from a string.

void casa::MSUVBin::weightSync ( )
private

Member Data Documentation

casacore::Vector<casacore::Int> casa::MSUVBin::chanMap_p
private

Definition at line 145 of file MSUVBin.h.

casacore::Vector<casacore::Vector<casacore::Int> > casa::MSUVBin::chanMapRev_p
private

Definition at line 146 of file MSUVBin.h.

casacore::CoordinateSystem casa::MSUVBin::csys_p
private

Definition at line 142 of file MSUVBin.h.

casacore::Vector<casacore::Double> casa::MSUVBin::deltas_p
private

Definition at line 148 of file MSUVBin.h.

casacore::Bool casa::MSUVBin::doFlag_p
private

Definition at line 156 of file MSUVBin.h.

casacore::Bool casa::MSUVBin::doW_p
private

Definition at line 156 of file MSUVBin.h.

casacore::Bool casa::MSUVBin::existOut_p
private

Definition at line 150 of file MSUVBin.h.

casacore::Double casa::MSUVBin::freqStart_p
private

Definition at line 144 of file MSUVBin.h.

casacore::Double casa::MSUVBin::freqStep_p
private

Definition at line 144 of file MSUVBin.h.

casacore::Float casa::MSUVBin::memFraction_p
private

Definition at line 155 of file MSUVBin.h.

casacore::Block<const casacore::MeasurementSet *> casa::MSUVBin::mss_p
private

Definition at line 153 of file MSUVBin.h.

casacore::Int casa::MSUVBin::nchan_p
private

Definition at line 143 of file MSUVBin.h.

casacore::Int casa::MSUVBin::npol_p
private

Definition at line 143 of file MSUVBin.h.

casacore::Matrix<casacore::Double> casa::MSUVBin::numVis_p
private

Definition at line 157 of file MSUVBin.h.

casacore::Int casa::MSUVBin::nx_p
private

Definition at line 143 of file MSUVBin.h.

casacore::Int casa::MSUVBin::ny_p
private

Definition at line 143 of file MSUVBin.h.

casacore::String casa::MSUVBin::outMSName_p
private

Definition at line 151 of file MSUVBin.h.

casacore::CountedPtr<casacore::MeasurementSet> casa::MSUVBin::outMsPtr_p
private

Definition at line 152 of file MSUVBin.h.

casacore::MDirection casa::MSUVBin::phaseCenter_p
private

Definition at line 147 of file MSUVBin.h.

casacore::Vector<casacore::Int> casa::MSUVBin::polMap_p
private

Definition at line 145 of file MSUVBin.h.

casacore::Matrix<casacore::Double> casa::MSUVBin::sumWeight_p
private

Definition at line 158 of file MSUVBin.h.

VisBufferUtil casa::MSUVBin::vbutil_p
private

Definition at line 154 of file MSUVBin.h.

casacore::Vector<casacore::Int> casa::MSUVBin::whichStokes_p
private

Definition at line 149 of file MSUVBin.h.


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