DOdeconvolver.h

Classes

deconvolver -- A simple deconvolver operating on images (no SkyEquation) (full description)

class deconvolver : public ApplicationObject

Interface

Public Members
deconvolver()
deconvolver(const String& dirty, const String& psf)
deconvolver(const deconvolver &other)
deconvolver &operator=(const deconvolver &other)
~deconvolver()
Bool open(const String& dirty, const String& psf)
Bool reopen()
Bool close()
String dirtyname() const
String psfname() const
Bool summary() const
String state() const
IPosition imageshape() const
Bool restore(const String& model, const String& image, Quantity& bmaj, Quantity& bmin, Quantity& bpa)
Bool residual(const String& model, const String& image)
Bool smooth(const String& model, const String& image, Quantity& bmaj, Quantity& bmin, Quantity& bpa, Bool normalizeVolume)
Bool clean(const String& algorithm, const Int niter, const Float gain, const Quantity& threshold, const Bool displayProgress, const String& model, const String& mask)
Bool clarkclean(const Int niter, const Float gain, const Quantity& threshold, const Bool displayProgress, const String& model, const String& mask, const Int histBins, const String<Vector>& psfPatchSize, const Float maxExtPsf, const Float speedUp, Int maxNumPix, const Int maxNumMajorCycles, const Int maxNumMinorIterations)
Bool pixon(const Quantity& sigma, const String& model, const Bool imagePlane = False)
Bool mem(const String& algorithm, const Int niter, const Quantity& sigma, const Quantity& targetFlux, Bool constrainTargetFlux, Bool displayprogress, const String& model, const String& prior = "", const String& mask = "", const Bool imagePlane = False)
Bool makeprior(const String& prior, const String& templateImage, const Quantity& lowClipfrom, const Quantity& lowClipto, const Quantity& highClipfrom, const Quantity& highClipto, const Vector<Vector>& blc, const Vector<Vector>& trc)
Bool setscales(const String& scaleMethod, const Int nscales, const Vector<Float>& userScaleSizes)
Bool nnls(const String& algorithm, const Int niter, const Float tolerance, const String& model, const String& fluxMask, const String& dataMask)
Bool ft(const String& model, const String& transform)
Bool make(const String& model)
Bool make1(const String& imagename)
Bool make(const String& model, ImageInterface<Float>& templateImage)
Bool boxmask(const String& boxmask, const Vector<Int> blc, const Vector<Int> trc, const Quantity& fillValue=1.0, const Quantity& externalValue=0.0)
Bool clipimage(const String& clippedImage, const String& inputImage, const Quantity& threshold)
Bool fitpsf(const String& psf, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa)
Bool convolve(const String& convolvedmodel, const String& model)
Bool makegaussian(const String& gaussianimage, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa, Bool normalizeVolume)
virtual String className() const
virtual Vector<String> methods() const
virtual Vector<String> noTraceMethods() const
virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)
Private Members
SubImage<Float>* innerQuarter(PagedImage<Float>& in)
SubImage<Float>* allQuarters(PagedImage<Float>& in)
Bool clone(const String& imageName, const String& newImageName)
void defaults()
Bool removeTable(const String& tablename)
Bool detached() const
String imageName() const
Bool valid() const
PGPlotter& getPGPlotter(Bool newPlotter=True)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The name MUST have the 'DO' prefix as this class is derived from ApplicationObject, and hence is classified as a distributed object. For the same reason the rest of its name must be in lower case. This class is a simplified version of the ComponentList class.

Synopsis

This class is a container that allows many SkyComponents to be grouped together and manipulated as a group. In this respect this class is identical to the ComponentList class. The user is encouraged to read the synopsis of that class for a general description of the capabilities of this class.

This class is differs from the ComponentList class in the following ways:

There is a one-to-one correspondence between the functions in the glish componentlist object (see the AIPS++ User Reference manual) and functions in this class. This is make simplify the porting from glish to C++ of a glish script using the componentlist distributed object.

Example

These examples are coded in the tDOcomponentlist.h file.

Example 1:

In this example a ComponentList object is created and used to calculate the ...

 

Motivation

This class was written to make the componentlist classes usable from glish

Thrown Exceptions

To Do

Member Description

deconvolver()

"deconvolver" ctor

deconvolver(const String& dirty, const String& psf)

deconvolver(const deconvolver &other)

deconvolver &operator=(const deconvolver &other)

~deconvolver()

Bool open(const String& dirty, const String& psf)

Open the given dirty image and psf

Bool reopen()

After some cleaning, the dirty image is replaced with the residual image in the deconvolver tool. reopen reinstates that dirty image; cannot be invoked before open has been invoked

Bool close()

Flush the ms to disk and detach from the ms file. All function calls after this will be a no-op.

String dirtyname() const

String psfname() const

Bool summary() const

Output a summary of the state of the object

String state() const

Return the state of the object as a string

IPosition imageshape() const

Return the image shape

Bool restore(const String& model, const String& image, Quantity& bmaj, Quantity& bmin, Quantity& bpa)

Restore

Bool residual(const String& model, const String& image)

Residual

Bool smooth(const String& model, const String& image, Quantity& bmaj, Quantity& bmin, Quantity& bpa, Bool normalizeVolume)

Smooth

Bool clean(const String& algorithm, const Int niter, const Float gain, const Quantity& threshold, const Bool displayProgress, const String& model, const String& mask)

Clean algorithm

Bool clarkclean(const Int niter, const Float gain, const Quantity& threshold, const Bool displayProgress, const String& model, const String& mask, const Int histBins, const String<Vector>& psfPatchSize, const Float maxExtPsf, const Float speedUp, Int maxNumPix, const Int maxNumMajorCycles, const Int maxNumMinorIterations)

Clark Clean algorithm

Bool pixon(const Quantity& sigma, const String& model, const Bool imagePlane = False)

Pixon algorithm

Bool mem(const String& algorithm, const Int niter, const Quantity& sigma, const Quantity& targetFlux, Bool constrainTargetFlux, Bool displayprogress, const String& model, const String& prior = "", const String& mask = "", const Bool imagePlane = False)

MEM algorithm add other inputs as required

Bool makeprior(const String& prior, const String& templateImage, const Quantity& lowClipfrom, const Quantity& lowClipto, const Quantity& highClipfrom, const Quantity& highClipto, const Vector<Vector>& blc, const Vector<Vector>& trc)

make a prior image

Bool setscales(const String& scaleMethod, const Int nscales, const Vector<Float>& userScaleSizes)

Set up scales: based on scaleMethod = "nscales" or "uservector", we will create the scale sizes in pixels via a power law or use the user specified scale sizes.

Bool nnls(const String& algorithm, const Int niter, const Float tolerance, const String& model, const String& fluxMask, const String& dataMask)

NNLS algorithm

Bool ft(const String& model, const String& transform)

Fourier transform the model and componentlist

Bool make(const String& model)

Make an empty image

Bool make1(const String& imagename)

Make an empty image with just one Stokes pixel (ie, for a mask)

Bool make(const String& model, ImageInterface<Float>& templateImage)

Make an empty image modeled after templateImage

Bool boxmask(const String& boxmask, const Vector<Int> blc, const Vector<Int> trc, const Quantity& fillValue=1.0, const Quantity& externalValue=0.0)

Make a Box Mask

Bool clipimage(const String& clippedImage, const String& inputImage, const Quantity& threshold)

Clip an image below some Stokes I threshold

Bool fitpsf(const String& psf, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa)

Fit the psf

Bool convolve(const String& convolvedmodel, const String& model)

Convolve one image with another

Bool makegaussian(const String& gaussianimage, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa, Bool normalizeVolume)

Make a Gaussian -- you might want to use it for convolution, etc

virtual String className() const

Stuff needed for distributing this class

virtual Vector<String> methods() const

virtual Vector<String> noTraceMethods() const

virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)

If your object has more than one method

SubImage<Float>* innerQuarter(PagedImage<Float>& in)

Cut the inner quarter out of an image

SubImage<Float>* allQuarters(PagedImage<Float>& in)

Return full image as a SubImage

Bool clone(const String& imageName, const String& newImageName)

Clone an image

void defaults()

Set the defaults

Bool removeTable(const String& tablename)

Bool detached() const

Prints an error message if the deconvolver DO is detached and returns True.

String imageName() const

Bool valid() const

PGPlotter& getPGPlotter(Bool newPlotter=True)