casa
5.7.0-16
|
Abstract base class to monitor progress in lattice operations. More...
#include <ClarkCleanProgress.h>
Public Member Functions | |
ClarkCleanProgress (casacore::PGPlotter *pgplotter=0, casacore::Int plotterIncrement=10) | |
virtual | ~ClarkCleanProgress () |
delete its PGPlotter More... | |
casacore::Bool | info (const casacore::Bool lastcall, const casacore::Int iteration, const casacore::Int numberIterations, const casacore::Float &maximum, const casacore::IPosition &posMaximum, const casacore::Float &totalFlux, const casacore::Bool majorIteration, const casacore::Bool resetBase=false) |
Plot the information if it has a PGPlotter. More... | |
casacore::Bool | finalize () |
Finish up any aspects of the plot which need to be finished. More... | |
casacore::Bool | hasPGPlotter () |
returns true if we have a live pgplotter_pointer Use: do a try { progress_pointer->hasPGPlotter(); } More... | |
Private Member Functions | |
void | basicSetUp (casacore::Bool doPlot=false) |
draw the outline of the plot; If doplot = true, redraw all the past data as well. More... | |
void | plotOne (const casacore::Int iteration, const casacore::Float resid, const casacore::Float flux) |
plot just the current points THIS ASSUMES WE HAVE A VALID PGPLOTTER More... | |
void | plotVectors () |
replot all points, but don't redraw plotter THIS ASSUMES WE HAVE A VALID PGPLOTTER More... | |
Private Attributes | |
casacore::PGPlotter * | itsPgplotter |
casacore::Vector< casacore::Float > | iterationNumber |
casacore::Vector< casacore::Float > | maxResiduals |
casacore::Vector< casacore::Float > | posResiduals |
casacore::Vector< casacore::Float > | negResiduals |
casacore::Vector< casacore::Float > | totalFluxes |
casacore::uInt | currentIndex |
casacore::uInt | currentTotalIterations |
casacore::Float | currentFluxScale |
casacore::Float | currentMinFluxScale |
casacore::Float | currentMaxResidual |
casacore::Float | currentMinResidual |
casacore::Int | plottingIncrement |
we are going to plot all points, but not all at once; every Increment iterations More... | |
casacore::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 as a bridge between the casacore::Lattice module and the casacore::ProgressMeter class (or any other class showing the progress).
Definition at line 92 of file ClarkCleanProgress.h.
casa::ClarkCleanProgress::ClarkCleanProgress | ( | casacore::PGPlotter * | pgplotter = 0 , |
casacore::Int | plotterIncrement = 10 |
||
) |
|
virtual |
delete its PGPlotter
|
private |
draw the outline of the plot; If doplot = true, redraw all the past data as well.
THIS ASSUMES WE HAVE A VALID PGPLOTTER
casacore::Bool casa::ClarkCleanProgress::finalize | ( | ) |
Finish up any aspects of the plot which need to be finished.
casacore::Bool casa::ClarkCleanProgress::hasPGPlotter | ( | ) |
returns true if we have a live pgplotter_pointer Use: do a try { progress_pointer->hasPGPlotter(); }
casacore::Bool casa::ClarkCleanProgress::info | ( | const casacore::Bool | lastcall, |
const casacore::Int | iteration, | ||
const casacore::Int | numberIterations, | ||
const casacore::Float & | maximum, | ||
const casacore::IPosition & | posMaximum, | ||
const casacore::Float & | totalFlux, | ||
const casacore::Bool | majorIteration, | ||
const casacore::Bool | resetBase = false |
||
) |
Plot the information if it has a PGPlotter.
|
private |
plot just the current points THIS ASSUMES WE HAVE A VALID PGPLOTTER
|
private |
replot all points, but don't redraw plotter THIS ASSUMES WE HAVE A VALID PGPLOTTER
|
private |
Definition at line 151 of file ClarkCleanProgress.h.
|
private |
Definition at line 143 of file ClarkCleanProgress.h.
|
private |
Definition at line 141 of file ClarkCleanProgress.h.
|
private |
Definition at line 145 of file ClarkCleanProgress.h.
|
private |
Definition at line 144 of file ClarkCleanProgress.h.
|
private |
Definition at line 146 of file ClarkCleanProgress.h.
|
private |
Definition at line 142 of file ClarkCleanProgress.h.
|
private |
Definition at line 136 of file ClarkCleanProgress.h.
|
private |
Definition at line 134 of file ClarkCleanProgress.h.
|
private |
Definition at line 137 of file ClarkCleanProgress.h.
|
private |
Definition at line 139 of file ClarkCleanProgress.h.
|
private |
we are going to plot all points, but not all at once; every Increment iterations
Definition at line 149 of file ClarkCleanProgress.h.
|
private |
Definition at line 138 of file ClarkCleanProgress.h.
|
private |
Definition at line 140 of file ClarkCleanProgress.h.