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

StatWT sets WEIGHT and SIGMA statistically. More...

#include <StatWT.h>

Inheritance diagram for casa::StatWT:
casa::GroupWorker casa::GroupWorkerBase

Public Member Functions

 StatWT (const ROVisibilityIterator &vi, const casacore::MS::PredefinedColumns datacol=casacore::MS::DATA, const casacore::String &fitspw="*", const casacore::String &outspw="*", const casacore::Bool dorms=false, const casacore::uInt minsamp=2, const std::vector< casacore::uInt > selcorrs=std::vector< casacore::uInt >())
 Construct an object that will set the weights and sigmas of vi's casacore::MeasurementSet, as selected by outspw, according to the scatter of the visibilities selected by fitspw. More...
 
Copy construct StatWT (const StatWT &other)
 
Destructor *virtual ~StatWT ()
 
virtual Assignment StatWToperator= (const StatWT &gw)
 
virtual asyncio::PrefetchColumnsprefetchColumns () const
 
This is where all the work
gets done *virtual
casacore::Bool 
process (VisBuffGroup &vbg)
 This is where all the work gets done! More...
 
- Public Member Functions inherited from casa::GroupWorker
 GroupWorker (const ROVisibilityIterator &invi)
 
Copy construct GroupWorker (const GroupWorker &gw)
 
Destructor *virtual ~GroupWorker ()
 
virtual Assignment GroupWorkeroperator= (const GroupWorker &gw)
 
- Public Member Functions inherited from casa::GroupWorkerBase
 GroupWorkerBase ()
 Create empty GroupWorkerBase you can assign to or attach. More...
 
Copy construct GroupWorkerBase (const GroupWorkerBase &other)
 
Destructor *virtual ~GroupWorkerBase ()
 
virtual Assignment
GroupWorkerBase
operator= (const GroupWorkerBase &gw)
 

Private Member Functions

 StatWT ()
 Disable null c'tor. More...
 
casacore::Bool update_variances (std::map< casacore::uInt, casacore::Vector< casacore::uInt > > &ns, std::map< casacore::uInt, casacore::Vector< casacore::Complex > > &means, std::map< casacore::uInt, casacore::Vector< casacore::Double > > &variances, const VisBuffer &vb, const casacore::Cube< casacore::Bool > &chanmaskedflags, const casacore::uInt maxAnt)
 
casacore::Bool apply_variances (VisBuffer &vb, std::map< casacore::uInt, casacore::Vector< casacore::uInt > > &ns, std::map< casacore::uInt, casacore::Vector< casacore::Double > > &variances, const casacore::uInt maxAnt)
 ns and variances are effectively const here, but declaring them that way would take some gymnastics. More...
 
casacore::uInt hashFunction (const casacore::Int ant1, const casacore::Int ant2, const casacore::Int maxAnt)
 Compute a baseline (row) index (ant1, ant2). More...
 

Private Attributes

casacore::MS::PredefinedColumns datacol_p
 Initialized by c'tor: More...
 
casacore::String fitspw_p
 
casacore::String outspw_p
 
casacore::Bool dorms_p
 
casacore::uInt rowsdone_p
 
std::set< casacore::Intoutspws_p
 
casacore::uInt minsamp_p
 Otherwise, use the standard sample variance. More...
 
std::vector< casacore::uIntselcorrs_p
 a variance. More...
 
std::map< casacore::Int,
casacore::Vector
< casacore::Bool > * > 
fitmask_p
 
Not initialized by c'tor:

std::set<casacore::Int> appliedSpWs_p; More...

 

Additional Inherited Members

- Protected Attributes inherited from casa::GroupWorker
ROVisibilityIterator invi_p
 
VisibilityIterator outvi_p
 
- Protected Attributes inherited from casa::GroupWorkerBase
asyncio::PrefetchColumns prefetchColumns_p
 

Detailed Description

StatWT sets WEIGHT and SIGMA statistically.

Intended use:

Public interface

Prerequisite

Etymology

StatWT sets WEIGHT and SIGMA statistically.

Synopsis

Set the weights and sigmas according to the scatter of the visibilities.

To Do

Definition at line 69 of file StatWT.h.

Constructor & Destructor Documentation

casa::StatWT::StatWT ( const ROVisibilityIterator vi,
const casacore::MS::PredefinedColumns  datacol = casacore::MS::DATA,
const casacore::String fitspw = "*",
const casacore::String outspw = "*",
const casacore::Bool  dorms = false,
const casacore::uInt  minsamp = 2,
const std::vector< casacore::uInt selcorrs = std::vector< casacore::uInt >() 
)

Construct an object that will set the weights and sigmas of vi's casacore::MeasurementSet, as selected by outspw, according to the scatter of the visibilities selected by fitspw.

If dorms is true, assume that the true mean is 0. Otherwise, use the standard sample variance.

For each baseline and correlation, if fitspw does not select at least minsamp unflagged visibilities, it will be flagged and weight and sigma will not be calculated. minsamp is effectively at least 2.

Copy construct casa::StatWT::StatWT ( const StatWT other)
inline

Definition at line 90 of file StatWT.h.

Destructor* virtual casa::StatWT::~StatWT ( )
virtual
casa::StatWT::StatWT ( )
private

Disable null c'tor.

Member Function Documentation

casacore::Bool casa::StatWT::apply_variances ( VisBuffer vb,
std::map< casacore::uInt, casacore::Vector< casacore::uInt > > &  ns,
std::map< casacore::uInt, casacore::Vector< casacore::Double > > &  variances,
const casacore::uInt  maxAnt 
)
private

ns and variances are effectively const here, but declaring them that way would take some gymnastics.

casacore::uInt casa::StatWT::hashFunction ( const casacore::Int  ant1,
const casacore::Int  ant2,
const casacore::Int  maxAnt 
)
inlineprivate

Compute a baseline (row) index (ant1, ant2).

It ASSUMES that ant1 and ant2 are both <= maxAnt.

Definition at line 123 of file StatWT.h.

virtual Assignment StatWT& casa::StatWT::operator= ( const StatWT gw)
inlinevirtual

Definition at line 96 of file StatWT.h.

virtual asyncio::PrefetchColumns* casa::StatWT::prefetchColumns ( ) const
virtual

Reimplemented from casa::GroupWorkerBase.

This is where all the work gets done* virtual casacore::Bool casa::StatWT::process ( VisBuffGroup vbg)
virtual

This is where all the work gets done!

Implements casa::GroupWorkerBase.

casacore::Bool casa::StatWT::update_variances ( std::map< casacore::uInt, casacore::Vector< casacore::uInt > > &  ns,
std::map< casacore::uInt, casacore::Vector< casacore::Complex > > &  means,
std::map< casacore::uInt, casacore::Vector< casacore::Double > > &  variances,
const VisBuffer vb,
const casacore::Cube< casacore::Bool > &  chanmaskedflags,
const casacore::uInt  maxAnt 
)
private

Member Data Documentation

casacore::MS::PredefinedColumns casa::StatWT::datacol_p
private

Initialized by c'tor:

Which of DATA, MODEL_DATA, or CORRECTED_DATA to fit. It will always write to DATA if datacols_p.nelements() == 1, and write to all 3 otherwise. Thus datacols_p.nelements() should be either 1 or 3. 4 and 2 are right out, and FLOAT_DATA isn't handled by this yet.

Definition at line 134 of file StatWT.h.

casacore::Bool casa::StatWT::dorms_p
private

Definition at line 138 of file StatWT.h.

std::map<casacore::Int, casacore::Vector<casacore::Bool>*> casa::StatWT::fitmask_p
private

Not initialized by c'tor:

std::set<casacore::Int> appliedSpWs_p;

Definition at line 147 of file StatWT.h.

casacore::String casa::StatWT::fitspw_p
private

Definition at line 136 of file StatWT.h.

casacore::uInt casa::StatWT::minsamp_p
private

Otherwise, use the standard sample variance.

Definition at line 142 of file StatWT.h.

casacore::String casa::StatWT::outspw_p
private

Definition at line 137 of file StatWT.h.

std::set<casacore::Int> casa::StatWT::outspws_p
private

Definition at line 140 of file StatWT.h.

casacore::uInt casa::StatWT::rowsdone_p
private

Definition at line 139 of file StatWT.h.

std::vector<casacore::uInt> casa::StatWT::selcorrs_p
private

a variance.

Definition at line 144 of file StatWT.h.


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