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
casa::ClarkCleanProgress Class Reference

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::PGPlotteritsPgplotter
 
casacore::Vector< casacore::FloatiterationNumber
 
casacore::Vector< casacore::FloatmaxResiduals
 
casacore::Vector< casacore::FloatposResiduals
 
casacore::Vector< casacore::FloatnegResiduals
 
casacore::Vector< casacore::FloattotalFluxes
 
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
 

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 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.

Constructor & Destructor Documentation

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

delete its PGPlotter

Member Function Documentation

void casa::ClarkCleanProgress::basicSetUp ( casacore::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

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.

void casa::ClarkCleanProgress::plotOne ( const casacore::Int  iteration,
const casacore::Float  resid,
const casacore::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

Member Data Documentation

casacore::Float casa::ClarkCleanProgress::baseFlux
private

Definition at line 151 of file ClarkCleanProgress.h.

casacore::Float casa::ClarkCleanProgress::currentFluxScale
private

Definition at line 143 of file ClarkCleanProgress.h.

casacore::uInt casa::ClarkCleanProgress::currentIndex
private

Definition at line 141 of file ClarkCleanProgress.h.

casacore::Float casa::ClarkCleanProgress::currentMaxResidual
private

Definition at line 145 of file ClarkCleanProgress.h.

casacore::Float casa::ClarkCleanProgress::currentMinFluxScale
private

Definition at line 144 of file ClarkCleanProgress.h.

casacore::Float casa::ClarkCleanProgress::currentMinResidual
private

Definition at line 146 of file ClarkCleanProgress.h.

casacore::uInt casa::ClarkCleanProgress::currentTotalIterations
private

Definition at line 142 of file ClarkCleanProgress.h.

casacore::Vector<casacore::Float> casa::ClarkCleanProgress::iterationNumber
private

Definition at line 136 of file ClarkCleanProgress.h.

casacore::PGPlotter* casa::ClarkCleanProgress::itsPgplotter
private

Definition at line 134 of file ClarkCleanProgress.h.

casacore::Vector<casacore::Float> casa::ClarkCleanProgress::maxResiduals
private

Definition at line 137 of file ClarkCleanProgress.h.

casacore::Vector<casacore::Float> casa::ClarkCleanProgress::negResiduals
private

Definition at line 139 of file ClarkCleanProgress.h.

casacore::Int casa::ClarkCleanProgress::plottingIncrement
private

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

Definition at line 149 of file ClarkCleanProgress.h.

casacore::Vector<casacore::Float> casa::ClarkCleanProgress::posResiduals
private

Definition at line 138 of file ClarkCleanProgress.h.

casacore::Vector<casacore::Float> casa::ClarkCleanProgress::totalFluxes
private

Definition at line 140 of file ClarkCleanProgress.h.


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