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

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

#include <LatticeCleanProgress.h>

List of all members.

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.

Private Member Functions

void initialize (const uInt nScales, const Float &maxResidual, const uInt numIterations)
 initizalize the arrays and such
void resizeDataStorage ()
 As the iterations trickle in, we will from time to time need to make the Matrices larger.
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.
void plotOne (const Int iteration, const Vector< Float > &resid, const Vector< Float > &flux)
 Note: you MUST call basicSetUp before calling this.

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


Member Function Documentation

void casa::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 casa::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 casa::LatticeCleanProgress::initialize ( const uInt  nScales,
const Float maxResidual,
const uInt  numIterations 
) [private]

initizalize the arrays and such

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

Note: you MUST call basicSetUp before calling this.

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

Definition at line 161 of file LatticeCleanProgress.h.

Definition at line 145 of file LatticeCleanProgress.h.

Definition at line 143 of file LatticeCleanProgress.h.

Definition at line 147 of file LatticeCleanProgress.h.

Definition at line 146 of file LatticeCleanProgress.h.

Definition at line 148 of file LatticeCleanProgress.h.

Definition at line 144 of file LatticeCleanProgress.h.

Definition at line 152 of file LatticeCleanProgress.h.

Definition at line 156 of file LatticeCleanProgress.h.

Definition at line 159 of file LatticeCleanProgress.h.

Definition at line 137 of file LatticeCleanProgress.h.

Definition at line 135 of file LatticeCleanProgress.h.

Definition at line 151 of file LatticeCleanProgress.h.

Definition at line 150 of file LatticeCleanProgress.h.

Definition at line 138 of file LatticeCleanProgress.h.

Definition at line 140 of file LatticeCleanProgress.h.

Definition at line 139 of file LatticeCleanProgress.h.

Definition at line 157 of file LatticeCleanProgress.h.

Definition at line 142 of file LatticeCleanProgress.h.

Definition at line 141 of file LatticeCleanProgress.h.

Definition at line 154 of file LatticeCleanProgress.h.

Definition at line 153 of file LatticeCleanProgress.h.


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