casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::StatWT Class Reference

StatWT sets WEIGHT and SIGMA statistically. More...

#include <StatWT.h>

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

List of all members.

Public Member Functions

 StatWT (const ROVisibilityIterator &vi, const MS::PredefinedColumns datacol=MS::DATA, const String &fitspw="*", const String &outspw="*", const Bool dorms=false, const uInt minsamp=2, const vector< uInt > selcorrs=vector< uInt >())
 Construct an object that will set the weights and sigmas of vi's MeasurementSet, as selected by outspw, according to the scatter of the visibilities selected by fitspw.
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 Bool 
process (VisBuffGroup &vbg)
 This is where all the work gets done!

Private Member Functions

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

Private Attributes

MS::PredefinedColumns datacol_p
 Initialized by c'tor:
String fitspw_p
String outspw_p
Bool dorms_p
uInt rowsdone_p
std::set< Intoutspws_p
uInt minsamp_p
 Otherwise, use the standard sample variance.
vector< uIntselcorrs_p
 a variance.
std::map< Int, Vector< Bool > * > fitmask_p
 Not initialized by c'tor: std::set<Int> appliedSpWs_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 MS::PredefinedColumns  datacol = MS::DATA,
const String fitspw = "*",
const String outspw = "*",
const Bool  dorms = false,
const uInt  minsamp = 2,
const vector< uInt selcorrs = vector< uInt >() 
)

Construct an object that will set the weights and sigmas of vi's 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

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

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

uInt casa::StatWT::hashFunction ( const Int  ant1,
const Int  ant2,
const Int  maxAnt 
) [inline, private]

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) [inline, virtual]

Definition at line 96 of file StatWT.h.

Reimplemented from casa::GroupWorkerBase.

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

This is where all the work gets done!

Implements casa::GroupWorkerBase.

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

Member Data Documentation

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.

Definition at line 138 of file StatWT.h.

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

Not initialized by c'tor: std::set<Int> appliedSpWs_p;.

Definition at line 147 of file StatWT.h.

Definition at line 136 of file StatWT.h.

Otherwise, use the standard sample variance.

Definition at line 142 of file StatWT.h.

Definition at line 137 of file StatWT.h.

std::set<Int> casa::StatWT::outspws_p [private]

Definition at line 140 of file StatWT.h.

Definition at line 139 of file StatWT.h.

vector<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: