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
casacore::LatticeCleanProgress Class Reference

Abstract base class to monitor progress in lattice operations. More...

#include <LatticeCleanProgress.h>

Public Member Functions

 LatticeCleanProgress (PGPlotter *pgplotter=0)
 
virtual ~LatticeCleanProgress ()
 
Bool info (const Bool lastcall, const Int iteration, const Int numberIterations, const Vector< Float > &maxima, const Block< IPosition > &posMaximum, const Float strengthOptimum, const Int optimumScale, const IPosition &positionOptimum, const Float &totalFlux, const Vector< Float > &totalFluxScale, const Bool resetBase=False)
 Print and plot the information. More...
 

Private Member Functions

void initialize (const uInt nScales, const Float &maxResidual, const uInt numIterations)
 initizalize the arrays and such More...
 
void resizeDataStorage ()
 As the iterations trickle in, we will from time to time need to make the Matrices larger. More...
 
void basicSetUp (Bool plotMatrices=False)
 this will redraw the plot with a new scale; if plotMatrices = False, just draw the boxes, else, replot all past data. More...
 
void plotOne (const Int iteration, const Vector< Float > &resid, const Vector< Float > &flux)
 Note: you MUST call basicSetUp before calling this. More...
 

Private Attributes

PGPlotteritsPgplotter
 
Vector< FloatiterationNumber
 
Matrix< FloatmaxResiduals
 
Matrix< FloatposResiduals
 
Matrix< FloatnegResiduals
 
Matrix< FloattotalFluxesPer
 
Vector< FloattotalFluxes
 
uInt currentIndex
 
uInt currentTotalIterations
 
Float currentFluxScale
 
Float currentMinFluxScale
 
Float currentMaxResidual
 
Float currentMinResidual
 
Float logMinRes
 
Float logMaxRes
 
Float deltaY
 
Float xMin
 
Float xMax
 
Float fluxScaleJump
 
Float residScaleJump
 
Float forbidden
 
Vector< FloatbaseFluxes
 

Detailed Description

Abstract base class to monitor progress in lattice operations.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

This is an abstract base class for classes to monitor the progress of an operation on a Lattice. The default implementation offered by this class does nothing. However, a derived class could show the progress using for example a ProgressMeter. A derived class should override the virtual functions from this class.

The user of the LatticeCleanProgress object should first call function init with the total number of steps that are to be done. Thereafter, after each step has been executed, function nstepsDone should be called after each step. Finally, function done should be called.

Example

Motivation

Since operations on Lattices can take a while, it can be useful to show the progress. However, making module Lattices dependent on the class ProgressMeter sounded bad. This abstract class serves as a bridge between the Lattice module and the ProgressMeter class (or any other class showing the progress).

Definition at line 91 of file LatticeCleanProgress.h.

Constructor & Destructor Documentation

casacore::LatticeCleanProgress::LatticeCleanProgress ( PGPlotter pgplotter = 0)
virtual casacore::LatticeCleanProgress::~LatticeCleanProgress ( )
virtual

Member Function Documentation

void casacore::LatticeCleanProgress::basicSetUp ( Bool  plotMatrices = False)
private

this will redraw the plot with a new scale; if plotMatrices = False, just draw the boxes, else, replot all past data.

Bool casacore::LatticeCleanProgress::info ( const Bool  lastcall,
const Int  iteration,
const Int  numberIterations,
const Vector< Float > &  maxima,
const Block< IPosition > &  posMaximum,
const Float  strengthOptimum,
const Int  optimumScale,
const IPosition positionOptimum,
const Float totalFlux,
const Vector< Float > &  totalFluxScale,
const Bool  resetBase = False 
)

Print and plot the information.

Currently, not all information is utilized.

void casacore::LatticeCleanProgress::initialize ( const uInt  nScales,
const Float maxResidual,
const uInt  numIterations 
)
private

initizalize the arrays and such

void casacore::LatticeCleanProgress::plotOne ( const Int  iteration,
const Vector< Float > &  resid,
const Vector< Float > &  flux 
)
private

Note: you MUST call basicSetUp before calling this.

void casacore::LatticeCleanProgress::resizeDataStorage ( )
private

As the iterations trickle in, we will from time to time need to make the Matrices larger.

Increase to 2*n+1

Member Data Documentation

Vector<Float> casacore::LatticeCleanProgress::baseFluxes
private

Definition at line 161 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::currentFluxScale
private

Definition at line 145 of file LatticeCleanProgress.h.

uInt casacore::LatticeCleanProgress::currentIndex
private

Definition at line 143 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::currentMaxResidual
private

Definition at line 147 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::currentMinFluxScale
private

Definition at line 146 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::currentMinResidual
private

Definition at line 148 of file LatticeCleanProgress.h.

uInt casacore::LatticeCleanProgress::currentTotalIterations
private

Definition at line 144 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::deltaY
private

Definition at line 152 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::fluxScaleJump
private

Definition at line 156 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::forbidden
private

Definition at line 159 of file LatticeCleanProgress.h.

Vector<Float> casacore::LatticeCleanProgress::iterationNumber
private

Definition at line 137 of file LatticeCleanProgress.h.

PGPlotter* casacore::LatticeCleanProgress::itsPgplotter
private

Definition at line 135 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::logMaxRes
private

Definition at line 151 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::logMinRes
private

Definition at line 150 of file LatticeCleanProgress.h.

Matrix<Float> casacore::LatticeCleanProgress::maxResiduals
private

Definition at line 138 of file LatticeCleanProgress.h.

Matrix<Float> casacore::LatticeCleanProgress::negResiduals
private

Definition at line 140 of file LatticeCleanProgress.h.

Matrix<Float> casacore::LatticeCleanProgress::posResiduals
private

Definition at line 139 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::residScaleJump
private

Definition at line 157 of file LatticeCleanProgress.h.

Vector<Float> casacore::LatticeCleanProgress::totalFluxes
private

Definition at line 142 of file LatticeCleanProgress.h.

Matrix<Float> casacore::LatticeCleanProgress::totalFluxesPer
private

Definition at line 141 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::xMax
private

Definition at line 154 of file LatticeCleanProgress.h.

Float casacore::LatticeCleanProgress::xMin
private

Definition at line 153 of file LatticeCleanProgress.h.


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