DOdeconvolver.h
Classes
- deconvolver -- A simple deconvolver operating on images (no SkyEquation) (full description)
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)
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:
- All components are indexed starting at one. This means the first
component in this class is obtained by component(1) rather
than component(0) in the ComponentList class.
- Copies of the components, rather than references, are returned to the
user. This means that this class needs a replace function whereas
ComponentList does not.
- Components that have been removed from the list are stored in a
temporary place. In the ComponentList class once they are deleted they
are gone.
- This class is derived from ApplicationObject and follows the AIPS++
conventions for "distributed objects". Hence the fuunctions in this
class can be made accessible from glish.
- This class can generate simulated components and add them to the list.
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
- AipsError - If an internal inconsistancy is detected, when compiled in
debug mode only.
To Do
- Nothing I hope. But I expect users will disagree.
Member Description
"deconvolver" ctor
deconvolver(const deconvolver &other)
deconvolver &operator=(const deconvolver &other)
Bool open(const String& dirty, const String& psf)
Open the given dirty image and psf
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
Flush the ms to disk and detach from the ms file. All function
calls after this will be a no-op.
Output a summary of the state of the object
Return the state of the object as a string
Return the image shape
Bool restore(const String& model, const String& image, Quantity& bmaj, Quantity& bmin, Quantity& bpa)
Restore
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
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
Stuff needed for distributing this class
If your object has more than one method
Cut the inner quarter out of an image
Return full image as a SubImage
Bool clone(const String& imageName, const String& newImageName)
Clone an image
Set the defaults
Prints an error message if the deconvolver DO is detached and returns True.
Bool valid() const