DOimager.h

Classes

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

class imager : public ApplicationObject

Interface

Public Members
imager()
imager(MeasurementSet &thems, Bool compress=False)
imager(const imager &other)
imager &operator=(const imager &other)
~imager()
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 MPosition& mLocation, const Float padding, const Bool usemodelcol=True)
Bool setsdoptions(const Float scale, const Float weight, const Int convsupport=-1)
Bool setvp(const Bool dovp, const Bool defaultVP, const String& vpTable, const Bool doSquint, const Quantity &parAngleInc)
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 boxmask(const String& mask, const Vector<Index>& blc, const Vector<Index>& trc, const Float value)
Bool clipimage(const String& image, const Quantity& threshold)
Bool mask(const String& mask, const String& imageName, const Quantity& threshold)
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 approximatepsf(const Vector<String>& model, const Vector<String>& psf)
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 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 pixon(const String& algorithm, const Quantity& sigma, const String& model)
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, const String& scaleType, const Float minPB, const Float constPB, const Vector<String>& fluxscale)
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 ft(const Vector<String>& model, const String& complist, Bool incremental=False)
Bool setjy(const Int fieldid, const Int spectralwindowid, const Vector<Double>& fluxDensity, const String& standard)
Bool make(const String& model)
Bool clone(const String& imageName, const String& newImageName)
Bool fitpsf(const String& psf, Quantity& mbmaj, Quantity& mbmin, Quantity& mbpa)
Bool correct(const Bool doparallactic, const Quantity& t)
Bool plotuv(const Bool rotate)
Bool plotvis(const String& type, const Int increment)
Bool plotweights(const Bool gridded, const Int increment)
Bool plotsummary()
Bool clipvis(const Quantity& threshold)
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
PGPlotter& getPGPlotter(Bool newPlotter=False)
virtual void setWFCleanImageSkyModel()
virtual void setClarkCleanImageSkyModel()
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

imager()

"imager" ctor

imager(MeasurementSet &thems, Bool compress=False)

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

imager(const imager &other)

imager &operator=(const imager &other)

~imager()

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

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

Set the data selection parameters

Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const MPosition& mLocation, const Float padding, const Bool usemodelcol=True)

The following setup methods define the state of the imager.

Set the processing options

Bool setsdoptions(const Float scale, const Float weight, const Int convsupport=-1)

The following setup methods define the state of the imager.

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

Set the voltage pattern

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 boxmask(const String& mask, const Vector<Index>& blc, const Vector<Index>& trc, const Float value)

Fill in a region of a mask

Bool clipimage(const String& image, const Quantity& threshold)

Clip on Stokes I

Bool mask(const String& mask, const String& imageName, const Quantity& threshold)

Make a mask image

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 approximatepsf(const Vector<String>& model, const Vector<String>& psf)

Approximate PSF

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 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 pixon(const String& algorithm, const Quantity& sigma, const String& model)

pixon 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, const String& scaleType, const Float minPB, const Float constPB, const Vector<String>& fluxscale)

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 ft(const Vector<String>& model, const String& complist, Bool incremental=False)

Fourier transform the model and componentlist

Bool setjy(const Int fieldid, const Int spectralwindowid, const Vector<Double>& fluxDensity, const String& standard)

Compute the model visibility using specified source flux densities

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

Bool correct(const Bool doparallactic, const Quantity& t)

Correct the visibility data (OBSERVED->CORRECTED)

Bool plotuv(const Bool rotate)

Plot the uv plane

Bool plotvis(const String& type, const Int increment)

Plot the visibilities

Bool plotweights(const Bool gridded, const Int increment)

Plot the weights

Bool plotsummary()

Plot a summary

Bool clipvis(const Quantity& threshold)

Clip visibilities

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()

multiple fields have been specified in setdata

Set the defaults

Bool detached() const

Prints an error message if the imager 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

PGPlotter& getPGPlotter(Bool newPlotter=False)

virtual void setWFCleanImageSkyModel()

Virtual methods to set the ImageSkyModel and SkyEquation. This allows derived class pimager to set parallelized specializations.

virtual void setClarkCleanImageSkyModel()

virtual void setSkyEquation()