casa::Imager Class Reference
[MeasurementEquations]

#include <Imager.h>

Inheritance diagram for casa::Imager:

Inheritance graph
[legend]
Collaboration diagram for casa::Imager:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class that contains functions needed for imager.

Definition at line 65 of file Imager.h.

Public Member Functions

 Imager ()
 Default constructor.
 Imager (MeasurementSet &ms, Bool compress=False)
 Imager (MeasurementSet &ms, PGPlotter &pgplotter, Bool compress=False)
 Imager (const Imager &)
 Copy constructor and assignment operator.
Imageroperator= (const Imager &)
virtual ~Imager ()
 Destructor.
virtual Bool openSubTables ()
 open all the subtables as userNoReadLock
virtual Bool lock ()
 Lock the ms and its subtables.
virtual Bool unlock ()
 Unlock the ms and its subtables.
Bool selectDataChannel (VisSet &vs, Vector< Int > &spectralwindowids, String &dataMode, Vector< Int > &dataNchan, Vector< Int > &dataStart, Vector< Int > &dataStep, MRadialVelocity &mDataStart, MRadialVelocity &mDataStep)
 Utility function to do channel selection.
virtual Bool checkCoord (CoordinateSystem &coordsys, String &imageName)
 Utility function to check coordinate match with existing image.
virtual void setImageParam (Int &nx, Int &ny, Int &npol, Int &nchan)
virtual void makeVisSet (VisSet *&vs, MeasurementSet &ms, Bool compress=False, Bool mosaicOrder=False)
 VisSet and resort.
virtual void makeVisSet (MeasurementSet &ms, Bool compress=False, Bool mosaicOrder=False)
 Just to create the SORTED_TABLE.
virtual void writeHistory (LogIO &os)
virtual void writeCommand (LogIO &os)
Bool makeEmptyImage (CoordinateSystem &imageCoord, String &name, Int fieldID=0)
 make an empty image
Bool makePBImage (ImageInterface< Float > &pbImage, Bool useSymmetricBeam=True)
 Functions to make Primary beams.
Bool makePBImage (const CoordinateSystem &imageCoord, const String &telescopeName, const String &diskPBName, Bool useSymmetricBeam=True)
Bool makePBImage (const CoordinateSystem &imageCoord, const Table &vpTable, const String &diskPBName)
Bool makePBImage (const Table &vpTable, ImageInterface< Float > &pbImage)
Bool makePBImage (const CoordinateSystem &imageCoord, PBMath &pbMath, const String &diskPBName)
Bool makePBImage (PBMath &pbMath, ImageInterface< Float > &pbImage)
void setObsInfo (ObsInfo &obsinfo)
ObsInfolatestObsInfo ()
Bool open (MeasurementSet &thems, Bool compress=False)
 Close the current ms, and replace it with the supplied ms.
Bool close ()
 Flush the ms to disk and detach from the ms file.
String name () const
 Return the name of the MeasurementSet.
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 ()
 Output a summary of the state of the object.
String state ()
 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< Int > &blc, const Vector< Int > &trc, const Float value)
 Fill in a region of a mask.
Bool regionmask (const String &maskimage, Record *imageRegRec, Matrix< Quantity > &blctrcs, const Float &value=1.0)
 Make a region either from record or array of blc trc (Matrix(nboxes,4)) into a mask image value is the value of the mask pixels.
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 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, const Vector< String > &psf=Vector< String >(0))
 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 setjy (const Vector< Int > &fieldid, const Vector< Int > &spectralwindowid, const String &fieldnames, const String &spwstring, const Vector< Double > &fluxDensity, const String &standard)
Bool setjy (const Vector< Int > &fieldid, const Vector< Int > &spectralwindowid, const String &fieldnames, const String &spwstring, const String &model, const Vector< Double > &fluxDensity, const String &standard)
Bool make (const String &model)
 Make an empty image.
Bool makemodelfromsd (const String &sdImage, const String &modelimage, const String &lowPSF, String &maskImage)
 make a model from a SD 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.
PGPlottergetPGPlotter ()
 This is necessary for setting from the DO.
void setPGPlotter (PGPlotter &thePlotter)
Bool valid () const
 Check if can proceed with this object.
Int interactivemask (const String &imagename, const String &maskname, Int &niter, Int &ncycles, String &threshold)
 Interactive mask drawing.
virtual Bool setimage (const Int nx, const Int ny, const Quantity &cellx, const Quantity &celly, const String &stokes, Bool doShift, const MDirection &phaseCenter, const Quantity &shiftx, const Quantity &shifty, const String &mode, const Int nchan, const Int start, const Int step, const MRadialVelocity &mStart, const MRadialVelocity &mStep, const Vector< Int > &spectralwindowids, const Int fieldid, const Int facets, const Quantity &distance)
 Set image construction parameters.
virtual Bool defineImage (const Int nx, const Int ny, const Quantity &cellx, const Quantity &celly, const String &stokes, const MDirection &phaseCenter, const Int fieldid, const String &mode, const Int nchan, const Int start, const Int step, const MFrequency &mFreqStart, const MRadialVelocity &mStart, const Quantity &qStep, const Vector< Int > &spectralwindowids, const Quantity &restFreq, const Int facets, const Quantity &distance)
virtual Bool setDataPerMS (const String &msname, const String &mode, const Vector< Int > &nchan, const Vector< Int > &start, const Vector< Int > &step, const Vector< Int > &spectralwindowids, const Vector< Int > &fieldid, const String &msSelect="", const String &timerng="", const String &fieldnames="", const Vector< Int > &antIndex=Vector< Int >(), const String &antnames="", const String &spwstring="", const String &uvdist="", const String &scan="")
 Set the data selection 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="", const String &timerng="", const String &fieldnames="", const Vector< Int > &antIndex=Vector< Int >(), const String &antnames="", const String &spwstring="", const String &uvdist="", const String &scan="")
Bool setoptions (const String &ftmachine, const Long cache, const Int tile, const String &gridfunction, const MPosition &mLocation, const Float padding, const Bool usemodelcol=True, const Int wprojplanes=1, const String &epJTableName="", const Bool applyPointingOffsets=True, const Bool doPointingCorrection=True, const String &cfCacheDirName="", const Float &pastep=5.0, const Float &pbLimit=5.0e-2)
 Set the processing options.
Bool setsdoptions (const Float scale, const Float weight, const Int convsupport=-1)
 Set the single dish processing options.
Bool setvp (const Bool dovp, const Bool defaultVP, const String &vpTable, const Bool doSquint, const Quantity &parAngleInc, const Quantity &skyPosThreshold, String defaultTel="")
 Set the voltage pattern.
Bool setscales (const String &scaleMethod, const Int inscales, const Vector< Float > &userScaleSizes)
 Set the scales to be searched in Multi Scale clean.
Bool settaylorterms (const Int intaylor)
 Set the number of taylor series terms in the expansion of the image as a function of frequency.

Static Public Member Functions

static Bool regionToImageMask (const String &maskimage, Record *imageRegRec, Matrix< Quantity > &blctrcs, const Float &value=1.0)

Protected Member Functions

void defaults ()
 Set the defaults.
Bool detached () const
 check if it is dettahced from ms.
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 getRestFreq (Vector< Double > &restFreq, const Int &spw)
 Get the rest frequency .
Bool restoreImages (const Vector< String > &restored)
Bool writeFluxScales (const Vector< String > &fluxScaleNames)
 names of flux scale images
String imageName ()
Bool pbguts (ImageInterface< Float > &in, ImageInterface< Float > &out, const MDirection &, const Quantity &)
Bool assertDefinedImageParameters () const
virtual void setWFCleanImageSkyModel ()
 Virtual methods to set the ImageSkyModel and SkyEquation.
virtual void setClarkCleanImageSkyModel ()
virtual void setSkyEquation ()
virtual void savePSF (const Vector< String > &psf)
String frmtTime (const Double time)

Protected Attributes

MeasurementSetms_p
MSHistoryHandlerhist_p
Table antab_p
Table datadesctab_p
Table feedtab_p
Table fieldtab_p
Table obstab_p
Table pointingtab_p
Table poltab_p
Table proctab_p
Table spwtab_p
Table statetab_p
Table dopplertab_p
Table flagcmdtab_p
Table freqoffsettab_p
Table historytab_p
Table sourcetab_p
Table syscaltab_p
Table weathertab_p
Int lockCounter_p
Int nx_p
Int ny_p
Int npol_p
Int nchan_p
ObsInfo latestObsInfo_p
String msname_p
MeasurementSetmssel_p
VisSetvs_p
FTMachineft_p
ComponentFTMachinecft_p
SkyEquationse_p
CleanImageSkyModelsm_p
VPSkyJonesvp_p
VPSkyJonesgvp_p
Bool setimaged_p
Bool nullSelect_p
Bool redoSkyModel_p
Float paStep_p
 if setimage was changed hence redo the skyModel.
Float pbLimit_p
Int facets_p
Int wprojPlanes_p
Quantity mcellx_p
Quantity mcelly_p
String stokes_p
String dataMode_p
String imageMode_p
Vector< IntdataNchan_p
Int imageNchan_p
Vector< IntdataStart_p
Vector< IntdataStep_p
Int imageStart_p
Int imageStep_p
MRadialVelocity mDataStart_p
MRadialVelocity mImageStart_p
MRadialVelocity mDataStep_p
MRadialVelocity mImageStep_p
MFrequency mfImageStart_p
MFrequency mfImageStep_p
MDirection phaseCenter_p
Quantity restFreq_p
Quantity distance_p
Bool doShift_p
Quantity shiftx_p
Quantity shifty_p
String ftmachine_p
String gridfunction_p
Bool wfGridding_p
Long cache_p
Int tile_p
MPosition mLocation_p
Bool doVP_p
Quantity bmaj_p
Quantity bmin_p
Quantity bpa_p
Bool beamValid_p
Float padding_p
Float sdScale_p
Float sdWeight_p
Int sdConvSupport_p
Float cyclefactor_p
 special mf control parms, etc
Float cyclespeedup_p
Int stoplargenegatives_p
Int stoppointmode_p
Vector< Stringfluxscale_p
String scaleType_p
Float minPB_p
Float constPB_p
Vector< Intspectralwindowids_p
Int fieldid_p
Vector< Intdataspectralwindowids_p
Vector< Intdatadescids_p
Vector< Intdatafieldids_p
String telescope_p
String vpTableStr_p
Quantity parAngleInc_p
 in the MS
Quantity skyPosThreshold_p
BeamSquint::SquintType squintType_p
Bool doDefaultVP_p
PGPlotterpgplotter_p
Bool doMultiFields_p
Bool multiFields_p
Bool doWideBand_p
ComponentListcomponentList_p
String scaleMethod_p
Int nscales_p
Int ntaylor_p
Vector< FloatuserScaleSizes_p
Bool scaleInfoValid_p
Int nmodels_p
Block< CountedPtr< PagedImage<
Float > > > 
images_p
 Everything here must be a real class since we make, handle and destroy these.
Block< CountedPtr< PagedImage<
Float > > > 
masks_p
Block< CountedPtr< PagedImage<
Float > > > 
fluxMasks_p
Block< CountedPtr< PagedImage<
Float > > > 
residuals_p
Bool freqFrameValid_p
 Freq frame is good and valid conversions can be done (or not).
SkyModel::PolRep polRep_p
 Preferred complex polarization representation.
Bool useModelCol_p
 Whether to use model column or use it in memory on the fly.
LogSink logSink_p
 sink used to store history mainly
EPJonesepJ
 Objects required for pointing correction (ftmachine=PBWProject).
String epJTableName_p
String cfCacheDirName_p
Bool doPointing
Bool doPBCorr
SimplePlotterPtr plotter_p
Record interactiveState_p


Constructor & Destructor Documentation

casa::Imager::Imager (  ) 

Default constructor.

casa::Imager::Imager ( MeasurementSet ms,
Bool  compress = False 
)

casa::Imager::Imager ( MeasurementSet ms,
PGPlotter pgplotter,
Bool  compress = False 
)

casa::Imager::Imager ( const Imager  ) 

Copy constructor and assignment operator.

virtual casa::Imager::~Imager (  )  [virtual]

Destructor.


Member Function Documentation

Imager& casa::Imager::operator= ( const Imager  ) 

virtual Bool casa::Imager::openSubTables (  )  [virtual]

open all the subtables as userNoReadLock

virtual Bool casa::Imager::lock (  )  [virtual]