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

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

#include <ClarkCleanProgress.h>

List of all members.

Public Member Functions

 ClarkCleanProgress (PGPlotter *pgplotter=0, Int plotterIncrement=10)
virtual ~ClarkCleanProgress ()
 delete its PGPlotter
Bool info (const Bool lastcall, const Int iteration, const Int numberIterations, const Float &maximum, const IPosition &posMaximum, const Float &totalFlux, const Bool majorIteration, const Bool resetBase=False)
 Plot the information if it has a PGPlotter.
Bool finalize ()
 Finish up any aspects of the plot which need to be finished.
Bool hasPGPlotter ()
 returns true if we have a live pgplotter_pointer Use: do a try { progress_pointer->hasPGPlotter(); }

Private Member Functions

void basicSetUp (Bool doPlot=False)
 draw the outline of the plot; If doplot = True, redraw all the past data as well.
void plotOne (const Int iteration, const Float resid, const Float flux)
 plot just the current points THIS ASSUMES WE HAVE A VALID PGPLOTTER
void plotVectors ()
 replot all points, but don't redraw plotter THIS ASSUMES WE HAVE A VALID PGPLOTTER

Private Attributes

PGPlotteritsPgplotter
Vector< FloatiterationNumber
Vector< FloatmaxResiduals
Vector< FloatposResiduals
Vector< FloatnegResiduals
Vector< FloattotalFluxes
uInt currentIndex
uInt currentTotalIterations
Float currentFluxScale
Float currentMinFluxScale
Float currentMaxResidual
Float currentMinResidual
Int plottingIncrement
 we are going to plot all points, but not all at once; every Increment iterations
Float baseFlux

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 ClarkCleanProgress 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 88 of file ClarkCleanProgress.h.


Constructor & Destructor Documentation

casa::ClarkCleanProgress::ClarkCleanProgress ( PGPlotter pgplotter = 0,
Int  plotterIncrement = 10 
)

delete its PGPlotter


Member Function Documentation

void casa::ClarkCleanProgress::basicSetUp ( Bool  doPlot = False) [private]

draw the outline of the plot; If doplot = True, redraw all the past data as well.

THIS ASSUMES WE HAVE A VALID PGPLOTTER

Finish up any aspects of the plot which need to be finished.

returns true if we have a live pgplotter_pointer Use: do a try { progress_pointer->hasPGPlotter(); }

Bool casa::ClarkCleanProgress::info ( const Bool  lastcall,
const Int  iteration,
const Int  numberIterations,
const Float maximum,
const IPosition posMaximum,
const Float totalFlux,
const Bool  majorIteration,
const Bool  resetBase = False 
)

Plot the information if it has a PGPlotter.

void casa::ClarkCleanProgress::plotOne ( const Int  iteration,
const Float  resid,
const Float  flux 
) [private]

plot just the current points THIS ASSUMES WE HAVE A VALID PGPLOTTER

replot all points, but don't redraw plotter THIS ASSUMES WE HAVE A VALID PGPLOTTER


Member Data Documentation

Definition at line 147 of file ClarkCleanProgress.h.

Definition at line 139 of file ClarkCleanProgress.h.

Definition at line 137 of file ClarkCleanProgress.h.

Definition at line 141 of file ClarkCleanProgress.h.

Definition at line 140 of file ClarkCleanProgress.h.

Definition at line 142 of file ClarkCleanProgress.h.

Definition at line 138 of file ClarkCleanProgress.h.

Definition at line 132 of file ClarkCleanProgress.h.

Definition at line 130 of file ClarkCleanProgress.h.

Definition at line 133 of file ClarkCleanProgress.h.

Definition at line 135 of file ClarkCleanProgress.h.

we are going to plot all points, but not all at once; every Increment iterations

Definition at line 145 of file ClarkCleanProgress.h.

Definition at line 134 of file ClarkCleanProgress.h.

Definition at line 136 of file ClarkCleanProgress.h.


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