DOqimager.h

Classes

qimager -- Makes images from a MeasurementSet with the SkyEquation (full description)

class qimager : public ApplicationObject

Interface

Public Members
qimager()
qimager(MeasurementSet &thems, Bool compress=False)
qimager(const qimager &other)
qimager &operator=(const qimager &other)
~qimager()
Bool open(MeasurementSet &thems, Bool compress=False)
Bool close()
String name() const
Bool setimage(const Int nx, const Int ny, const Quantity& cellx, const Quantity& celly, const String& stokes, Bool doShift, const String& phaseCenter, const Quantity& shiftx, const Quantity& shifty, const String& mode, const Int nchan, const Int start, const Int step, const MDirection& mStart, const MDirection& mStep, const MRadialVelocity<Int>& spectralwindowids, const Int fieldid, const Int facets, const Quantity& distance)
Bool setdata(const String& mode, const Vector<Int>& nchan, const Vector<Int>& start, const Vector<Int>& step, const MRadialVelocity& mStart, const MRadialVelocity& mStep, const Vector<Int>& spectralwindowids, const Vector<Int>& fieldid, const String& msSelect="")
Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const Float padding)
Bool setsdoptions(const Float scale, const Float weight)
Bool setvp(const Bool dovp, const Bool defaultVP, const String& vpTable, const Bool doSquint, const Quantity &parAngleInc)
Bool setscales(const Vector<Float>& userScaleSizes)
Bool advise(const Bool takeAdvice, const Float amplitudeloss, const Quantity& fieldOfView, Quantity& cell, Int& npixels, Int& facets, MDirection& phaseCenter)
Bool summary() const
String state() const
Bool imagecoordinates(CoordinateSystem& coordInfo)
IPosition imageshape() const
Bool weight(const String& algorithm, const String& rmode, const Quantity& noise, const Double robust, const Quantity& fieldofview, const Int npixels)
Bool filter(const String& type, const Quantity& bmaj, const Quantity& bmin, const Quantity& bpa)
Bool uvrange(const Double& uvmin, const Double& uvmax)
Bool sensitivity(Quantity& pointsourcesens, Double& relativesens, Double& sumwt)
Bool makeimage(const String& type, const String& imageName)
Bool makeimage(const String& type, const String& imageName, const String& complexImageName)
Bool approximatepsf(const Vector<String>& model, const Vector<String>& psf)
Bool restore(const Vector<String>& model, const String& complist, const Vector<String>& image, const Vector<String>& residual)
Bool setbeam(const Quantity& bmaj, const Quantity& bmin, const Quantity& bpa)
Bool residual(const Vector<String>& model, const String& complist, const Vector<String>& image)
Bool smooth(const Vector<String>& model, const Vector<String>& image, Bool usefit, 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 Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& mask, const Vector<String>& restored, const Vector<String>& residual)
Bool mem(const String& algorithm, const Int niter, const Float gain, const Quantity& sigma, const Quantity& targetflux, const Bool constrainflux, const Bool displayProgress, const Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& prior, const Vector<String>& mask, const Vector<String>& restored, const Vector<String>& residual)
Bool nnls(const String& algorithm, const Int niter, const Float tolerance, const Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& fluxMask, const Vector<String>& dataMask, const Vector<String>& restored, const Vector<String>& residual)
Bool setmfcontrol(const Float cyclefactor, const Float cyclespeedup, const Int stoplargenegatives, const Int stoppointmode)
Bool feather(const String& image, const String& highres, const String& lowres, const String& lowpsf)
Bool pb(const String& inimage, const String& outimage, const String& incomps, const String& outcomps, const String& operation, const MDirection& pointngCenter, const Quantity& pa, const String& pborvp)
Bool linearmosaic(const String& mosaic, const String& fluxscale, const String& sensitivity, const Vector<String>& images, const Vector<Int>& fieldids)
Bool predict(const Vector<String>& model, const String& complist, Bool incremental=False)
Bool make(const String& model)
Bool clone(const String& imageName, const String& newImageName)
Bool fitpsf(const String& psf, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa)
virtual String className() const
virtual Vector<String> methods() const
virtual Vector<String> noTraceMethods() const
virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)
Protected Members
void defaults()
Bool detached() const
Bool createFTMachine()
Bool removeTable(const String& tablename)
Bool createSkyEquation(const String complist="")
Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const String complist="")
Bool createSkyEquation(const Vector<String>& image, const String complist="")
Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const Vector<String>& mask, const String complist="")
Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const Vector<String>& mask, const Vector<String>& fluxMask, const String complist="")
void destroySkyEquation()
Bool addResidualsToSkyEquation(const Vector<String>& residual)
Bool addMasksToSkyEquation(const Vector<String>& mask)
Bool restoreImages(const Vector<String>& restored)
Bool writeFluxScales(const Vector<String>& fluxScaleNames)
String imageName() const
Bool pbguts(ImageInterface<Float>& in, ImageInterface<Float>& out, const MDirection&, const Quantity&)
Bool valid() const
Bool assertDefinedImageParameters() const
virtual void setSkyEquation()

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

qimager()

"qimager" ctor

qimager(MeasurementSet &thems, Bool compress=False)

Construct an qimager tool from a MeasurementSet and a flag indicating whether compression of attached calibration data columns is required

qimager(const qimager &other)

qimager &operator=(const qimager &other)

~qimager()

Bool open(MeasurementSet &thems, Bool compress=False)

Close the current ms, and replace it with the supplied ms. Optionally compress the attached calibration data columns if they are created here.

Bool close()

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

String name() const

Return the name of the MeasurementSet

Bool setimage(const Int nx, const Int ny, const Quantity& cellx, const Quantity& celly, const String& stokes, Bool doShift, const String& phaseCenter, const Quantity& shiftx, const Quantity& shifty, const String& mode, const Int nchan, const Int start, const Int step, const MDirection& mStart, const MDirection& mStep, const MRadialVelocity<Int>& spectralwindowids, const Int fieldid, const Int facets, const Quantity& distance)

The following setup methods define the state of the qimager.

Set image construction parameters

Bool setdata(const String& mode, const Vector<Int>& nchan, const Vector<Int>& start, const Vector<Int>& step, const MRadialVelocity& mStart, const MRadialVelocity& mStep, const Vector<Int>& spectralwindowids, const Vector<Int>& fieldid, const String& msSelect="")

The following setup methods define the state of the qimager.

Set the data selection parameters

Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const Float padding)

The following setup methods define the state of the qimager.

Set the processing options

Bool setsdoptions(const Float scale, const Float weight)

The following setup methods define the state of the qimager.

Set the single dish processing options

Bool setvp(const Bool dovp, const Bool defaultVP, const String& vpTable, const Bool doSquint, const Quantity &parAngleInc)

The following setup methods define the state of the qimager.

Set the voltage pattern

Bool setscales(const Vector<Float>& userScaleSizes)

The following setup methods define the state of the qimager.

Set the scales to be searched in Multi Scale clean

Bool advise(const Bool takeAdvice, const Float amplitudeloss, const Quantity& fieldOfView, Quantity& cell, Int& npixels, Int& facets, MDirection& phaseCenter)

Advise on suitable values

Bool summary() const

Output a summary of the state of the object

String state() const

Return the state of the object as a string

Bool imagecoordinates(CoordinateSystem& coordInfo)

Return the image coordinates

IPosition imageshape() const

Return the image shape

Bool weight(const String& algorithm, const String& rmode, const Quantity& noise, const Double robust, const Quantity& fieldofview, const Int npixels)

Weight the MeasurementSet

Bool filter(const String& type, const Quantity& bmaj, const Quantity& bmin, const Quantity& bpa)

Filter the MeasurementSet

Bool uvrange(const Double& uvmin, const Double& uvmax)

Apply a uvrange

Bool sensitivity(Quantity& pointsourcesens, Double& relativesens, Double& sumwt)

Sensitivity

Bool makeimage(const String& type, const String& imageName)

Make plain image

Bool makeimage(const String& type, const String& imageName, const String& complexImageName)

Make plain image: keep the complex image as well

Bool approximatepsf(const Vector<String>& model, const Vector<String>& psf)

Approximate PSF

Bool restore(const Vector<String>& model, const String& complist, const Vector<String>& image, const Vector<String>& residual)

Restore

Bool setbeam(const Quantity& bmaj, const Quantity& bmin, const Quantity& bpa)

Setbeam

Bool residual(const Vector<String>& model, const String& complist, const Vector<String>& image)

Residual

Bool smooth(const Vector<String>& model, const Vector<String>& image, Bool usefit, 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 Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& mask, const Vector<String>& restored, const Vector<String>& residual)

Clean algorithm

Bool mem(const String& algorithm, const Int niter, const Float gain, const Quantity& sigma, const Quantity& targetflux, const Bool constrainflux, const Bool displayProgress, const Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& prior, const Vector<String>& mask, const Vector<String>& restored, const Vector<String>& residual)

MEM algorithm

Bool nnls(const String& algorithm, const Int niter, const Float tolerance, const Vector<String>& model, const Vector<Bool>& fixed, const String& complist, const Vector<String>& fluxMask, const Vector<String>& dataMask, const Vector<String>& restored, const Vector<String>& residual)

NNLS algorithm

Bool setmfcontrol(const Float cyclefactor, const Float cyclespeedup, const Int stoplargenegatives, const Int stoppointmode)

Multi-field control parameters

Bool feather(const String& image, const String& highres, const String& lowres, const String& lowpsf)

Feathering algorithm

Bool pb(const String& inimage, const String& outimage, const String& incomps, const String& outcomps, const String& operation, const MDirection& pointngCenter, const Quantity& pa, const String& pborvp)

Apply or correct for Primary Beam or Voltage Pattern

Bool linearmosaic(const String& mosaic, const String& fluxscale, const String& sensitivity, const Vector<String>& images, const Vector<Int>& fieldids)

Make a linear mosaic of several images

Bool predict(const Vector<String>& model, const String& complist, Bool incremental=False)

Predict from the model and componentlist

Bool make(const String& model)

Make an empty image

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

Clone an image

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

Fit the psf

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

void defaults()

make default VPs, rather than reading in a vpTable

Set the defaults

Bool detached() const

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

Bool createFTMachine()

Create the FTMachines when necessary or when the control parameters have changed.

Bool removeTable(const String& tablename)

Bool createSkyEquation(const String complist="")

Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const String complist="")

Bool createSkyEquation(const Vector<String>& image, const String complist="")

Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const Vector<String>& mask, const String complist="")

Bool createSkyEquation(const Vector<String>& image, const Vector<Bool>& fixed, const Vector<String>& mask, const Vector<String>& fluxMask, const String complist="")

void destroySkyEquation()

Bool addResidualsToSkyEquation(const Vector<String>& residual)

Add the residuals to the SkyEquation

Bool addMasksToSkyEquation(const Vector<String>& mask)

Add or replace the masks

Bool restoreImages(const Vector<String>& restored)

Bool writeFluxScales(const Vector<String>& fluxScaleNames)

names of flux scale images

String imageName() const

Bool pbguts(ImageInterface<Float>& in, ImageInterface<Float>& out, const MDirection&, const Quantity&)

Bool valid() const

Bool assertDefinedImageParameters() const

virtual void setSkyEquation()