StatWT sets WEIGHT and SIGMA statistically. More...
#include <StatWT.h>
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 StatWT & | operator= (const StatWT &gw) |
virtual asyncio::PrefetchColumns * | prefetchColumns () 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< Int > | outspws_p |
uInt | minsamp_p |
Otherwise, use the standard sample variance. | |
vector< uInt > | selcorrs_p |
a variance. | |
std::map< Int, Vector< Bool > * > | fitmask_p |
Not initialized by c'tor: std::set<Int> appliedSpWs_p;. |
StatWT sets WEIGHT and SIGMA statistically.
Public interface
StatWT sets WEIGHT and SIGMA statistically.
Set the weights and sigmas according to the scatter of the visibilities.
Definition at line 69 of file StatWT.h.
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] |
Destructor* virtual casa::StatWT::~StatWT | ( | ) | [virtual] |
casa::StatWT::StatWT | ( | ) | [private] |
Disable null c'tor.
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] |
Reimplemented from casa::GroupWorker.
virtual asyncio::PrefetchColumns* casa::StatWT::prefetchColumns | ( | ) | const [virtual] |
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] |
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.
Bool casa::StatWT::dorms_p [private] |
std::map<Int, Vector<Bool>*> casa::StatWT::fitmask_p [private] |
String casa::StatWT::fitspw_p [private] |
uInt casa::StatWT::minsamp_p [private] |
String casa::StatWT::outspw_p [private] |
std::set<Int> casa::StatWT::outspws_p [private] |
uInt casa::StatWT::rowsdone_p [private] |
vector<uInt> casa::StatWT::selcorrs_p [private] |