casa
$Rev:20696$
|
Abstract base class to monitor progress in lattice operations. More...
#include <ClarkCleanProgress.h>
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 | |
PGPlotter * | itsPgplotter |
Vector< Float > | iterationNumber |
Vector< Float > | maxResiduals |
Vector< Float > | posResiduals |
Vector< Float > | negResiduals |
Vector< Float > | totalFluxes |
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 |
Abstract base class to monitor progress in lattice operations.
Public interface
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.
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.
casa::ClarkCleanProgress::ClarkCleanProgress | ( | PGPlotter * | pgplotter = 0 , |
Int | plotterIncrement = 10 |
||
) |
virtual casa::ClarkCleanProgress::~ClarkCleanProgress | ( | ) | [virtual] |
delete its PGPlotter
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(); }
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
void casa::ClarkCleanProgress::plotVectors | ( | ) | [private] |
replot all points, but don't redraw plotter THIS ASSUMES WE HAVE A VALID PGPLOTTER
Float casa::ClarkCleanProgress::baseFlux [private] |
Definition at line 147 of file ClarkCleanProgress.h.
Definition at line 139 of file ClarkCleanProgress.h.
uInt casa::ClarkCleanProgress::currentIndex [private] |
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.
Vector<Float> casa::ClarkCleanProgress::iterationNumber [private] |
Definition at line 132 of file ClarkCleanProgress.h.
PGPlotter* casa::ClarkCleanProgress::itsPgplotter [private] |
Definition at line 130 of file ClarkCleanProgress.h.
Vector<Float> casa::ClarkCleanProgress::maxResiduals [private] |
Definition at line 133 of file ClarkCleanProgress.h.
Vector<Float> casa::ClarkCleanProgress::negResiduals [private] |
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.
Vector<Float> casa::ClarkCleanProgress::posResiduals [private] |
Definition at line 134 of file ClarkCleanProgress.h.
Vector<Float> casa::ClarkCleanProgress::totalFluxes [private] |
Definition at line 136 of file ClarkCleanProgress.h.