casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::LatticeCleanProgress Class Reference

More...

#include <LatticeCleanProgress.h>

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

Private Member Functions

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

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 89 of file LatticeCleanProgress.h.

Constructor & Destructor Documentation

◆ LatticeCleanProgress()

casacore::LatticeCleanProgress::LatticeCleanProgress ( PGPlotter pgplotter = 0)

◆ ~LatticeCleanProgress()

virtual casacore::LatticeCleanProgress::~LatticeCleanProgress ( )
virtual

Member Function Documentation

◆ basicSetUp()

void casacore::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.

◆ info()

Bool casacore::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.

◆ initialize()

void casacore::LatticeCleanProgress::initialize ( const uInt  nScales,
const Float maxResidual,
const uInt  numIterations 
)
private

initizalize the arrays and such

◆ plotOne()

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

Note: you MUST call basicSetUp before calling this.

◆ resizeDataStorage()

void casacore::LatticeCleanProgress::resizeDataStorage ( )
private

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

◆ baseFluxes

Vector<Float> casacore::LatticeCleanProgress::baseFluxes
private

Definition at line 159 of file LatticeCleanProgress.h.

◆ currentFluxScale

Float casacore::LatticeCleanProgress::currentFluxScale
private

Definition at line 143 of file LatticeCleanProgress.h.

◆ currentIndex

uInt casacore::LatticeCleanProgress::currentIndex
private

Definition at line 141 of file LatticeCleanProgress.h.

◆ currentMaxResidual

Float casacore::LatticeCleanProgress::currentMaxResidual
private

Definition at line 145 of file LatticeCleanProgress.h.

◆ currentMinFluxScale

Float casacore::LatticeCleanProgress::currentMinFluxScale
private

Definition at line 144 of file LatticeCleanProgress.h.

◆ currentMinResidual

Float casacore::LatticeCleanProgress::currentMinResidual
private

Definition at line 146 of file LatticeCleanProgress.h.

◆ currentTotalIterations

uInt casacore::LatticeCleanProgress::currentTotalIterations
private

Definition at line 142 of file LatticeCleanProgress.h.

◆ deltaY

Float casacore::LatticeCleanProgress::deltaY
private

Definition at line 150 of file LatticeCleanProgress.h.

◆ fluxScaleJump

Float casacore::LatticeCleanProgress::fluxScaleJump
private

Definition at line 154 of file LatticeCleanProgress.h.

◆ forbidden

Float casacore::LatticeCleanProgress::forbidden
private

Definition at line 157 of file LatticeCleanProgress.h.

◆ iterationNumber

Vector<Float> casacore::LatticeCleanProgress::iterationNumber
private

Definition at line 135 of file LatticeCleanProgress.h.

◆ itsPgplotter

PGPlotter* casacore::LatticeCleanProgress::itsPgplotter
private

Definition at line 133 of file LatticeCleanProgress.h.

◆ logMaxRes

Float casacore::LatticeCleanProgress::logMaxRes
private

Definition at line 149 of file LatticeCleanProgress.h.

◆ logMinRes

Float casacore::LatticeCleanProgress::logMinRes
private

Definition at line 148 of file LatticeCleanProgress.h.

◆ maxResiduals

Matrix<Float> casacore::LatticeCleanProgress::maxResiduals
private

Definition at line 136 of file LatticeCleanProgress.h.

◆ negResiduals

Matrix<Float> casacore::LatticeCleanProgress::negResiduals
private

Definition at line 138 of file LatticeCleanProgress.h.

◆ posResiduals

Matrix<Float> casacore::LatticeCleanProgress::posResiduals
private

Definition at line 137 of file LatticeCleanProgress.h.

◆ residScaleJump

Float casacore::LatticeCleanProgress::residScaleJump
private

Definition at line 155 of file LatticeCleanProgress.h.

◆ totalFluxes

Vector<Float> casacore::LatticeCleanProgress::totalFluxes
private

Definition at line 140 of file LatticeCleanProgress.h.

◆ totalFluxesPer

Matrix<Float> casacore::LatticeCleanProgress::totalFluxesPer
private

Definition at line 139 of file LatticeCleanProgress.h.

◆ xMax

Float casacore::LatticeCleanProgress::xMax
private

Definition at line 152 of file LatticeCleanProgress.h.

◆ xMin

Float casacore::LatticeCleanProgress::xMin
private

Definition at line 151 of file LatticeCleanProgress.h.


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