Imager.h

Go to the documentation of this file.
00001 //# Imager.h: Imager functionality sits here; 
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#
00025 //# $Id$
00026 
00027 #ifndef SYNTHESIS_IMAGER_H
00028 #define SYNTHESIS_IMAGER_H
00029 
00030 #include <casa/aips.h>
00031 #include <casa/OS/Timer.h>
00032 #include <casa/Containers/Record.h>
00033 #include <ms/MeasurementSets/MeasurementSet.h>
00034 #include <casa/Arrays/IPosition.h>
00035 #include <casa/Quanta/Quantum.h>
00036 
00037 #include <measures/Measures/MDirection.h>
00038 #include <measures/Measures/MPosition.h>
00039 #include <measures/Measures/MRadialVelocity.h>
00040 
00041 #include <synthesis/MeasurementComponents/CleanImageSkyModel.h>
00042 #include <synthesis/MeasurementComponents/BeamSquint.h>
00043 #include <synthesis/MeasurementComponents/WFCleanImageSkyModel.h>
00044 #include <synthesis/MeasurementComponents/ClarkCleanImageSkyModel.h>
00045 #include <synthesis/MeasurementEquations/SkyEquation.h>
00046 #include <graphics/GenericPlotter/SimplePlotter.h>
00047 
00048 namespace casa { //# NAMESPACE CASA - BEGIN
00049 
00050 // Forward declarations
00051 class VisSet;
00052 class MSHistoryHandler;
00053 class PBMath;
00054 class MeasurementSet;
00055 class MFrequency;
00056 class File;
00057 class VPSkyJones;
00058 class PGPlotter;
00059 class EPJones;
00060 template<class T> class ImageInterface;
00061 
00062 // <summary> Class that contains functions needed for imager </summary>
00063 
00064 
00065 class Imager 
00066 {
00067  public:
00068   // Default constructor
00069 
00070   Imager();
00071 
00072   Imager(MeasurementSet& ms, Bool compress=False);
00073   Imager(MeasurementSet& ms, PGPlotter& pgplotter, Bool compress=False);
00074 
00075   // Copy constructor and assignment operator
00076   Imager(const Imager&);
00077   Imager& operator=(const Imager&);
00078 
00079   // Destructor
00080   virtual ~Imager();
00081   
00082   // open all the subtables as userNoReadLock
00083   virtual Bool openSubTables();
00084 
00085 
00086   // Lock the ms and its subtables
00087   virtual Bool lock();
00088 
00089   // Unlock the ms and its subtables
00090   virtual Bool unlock();
00091 
00092 
00093   // Utility function to do channel selection
00094 
00095   Bool selectDataChannel(VisSet& vs, Vector<Int>& spectralwindowids, 
00096                                  String& dataMode, 
00097                                  Vector<Int>& dataNchan, 
00098                                  Vector<Int>& dataStart, Vector<Int>& dataStep,
00099                                  MRadialVelocity& mDataStart, 
00100                                  MRadialVelocity& mDataStep);
00101   //Utility function to check coordinate match with existing image
00102 
00103   virtual Bool checkCoord(CoordinateSystem& coordsys, 
00104                           String& imageName); 
00105 
00106   virtual void setImageParam(Int& nx, Int& ny, Int& npol, Int& nchan); 
00107 
00108   //VisSet and resort 
00109   virtual void makeVisSet(VisSet* & vs, MeasurementSet& ms, 
00110                           Bool compress=False, Bool mosaicOrder=False);
00111   //Just to create the SORTED_TABLE
00112   virtual void makeVisSet(MeasurementSet& ms, 
00113                           Bool compress=False, Bool mosaicOrder=False);
00114 
00115   virtual void writeHistory(LogIO& os);
00116 
00117   virtual void writeCommand(LogIO& os);
00118 
00119   //make an empty image
00120   Bool makeEmptyImage(CoordinateSystem& imageCoord, String& name, Int fieldID=0);
00121 
00122   //Functions to make Primary beams 
00123   Bool makePBImage(ImageInterface<Float>& pbImage, 
00124                    Bool useSymmetricBeam=True);
00125   Bool makePBImage(const CoordinateSystem& imageCoord, 
00126                    const String& telescopeName, const String& diskPBName, 
00127                    Bool useSymmetricBeam=True);
00128   
00129   Bool makePBImage(const CoordinateSystem& imageCoord, 
00130                    const Table& vpTable, const String& diskPBName);
00131   
00132   Bool makePBImage(const Table& vpTable, ImageInterface<Float>& pbImage);
00133   
00134   Bool makePBImage(const CoordinateSystem& imageCoord, PBMath& pbMath, const String& diskPBName);
00135   
00136   Bool makePBImage(PBMath& pbMath, ImageInterface<Float>& pbImage);
00137   
00138   void setObsInfo(ObsInfo& obsinfo);
00139   ObsInfo& latestObsInfo();
00140 // Close the current ms, and replace it with the supplied ms.
00141   // Optionally compress the attached calibration data
00142   // columns if they are created here.
00143   Bool open(MeasurementSet &thems, Bool compress=False);
00144   
00145   // Flush the ms to disk and detach from the ms file. All function
00146   // calls after this will be a no-op.
00147   Bool close();
00148   
00149   // Return the name of the MeasurementSet
00150   String name() const;
00151   
00152   // The following setup methods define the state of the imager.
00153   // <group>
00154   // Set image construction parameters
00155   virtual Bool setimage(const Int nx, const Int ny,
00156                 const Quantity& cellx, const Quantity& celly,
00157                 const String& stokes,
00158                 Bool doShift,
00159                 const MDirection& phaseCenter, 
00160                 const Quantity& shiftx, const Quantity& shifty,
00161                 const String& mode, const Int nchan,
00162                 const Int start, const Int step,
00163                 const MRadialVelocity& mStart, const MRadialVelocity& mStep,
00164                 const Vector<Int>& spectralwindowids, const Int fieldid,
00165                 const Int facets, const Quantity& distance);
00166 
00167   virtual Bool defineImage(const Int nx, const Int ny,
00168                            const Quantity& cellx, const Quantity& celly,
00169                            const String& stokes,
00170                            const MDirection& phaseCenter, 
00171                            const Int fieldid,
00172                            const String& mode, const Int nchan,
00173                            const Int start, const Int step,
00174                            const MFrequency& mFreqStart,
00175                            const MRadialVelocity& mStart, 
00176                            const Quantity& qStep,
00177                            const Vector<Int>& spectralwindowids, 
00178                            const Quantity& restFreq,
00179                            const Int facets, const Quantity& distance,
00180                            const Bool trackSource=False, const MDirection& 
00181                            trackDir=MDirection(Quantity(0.0, "deg"), 
00182                                                Quantity(90.0, "deg")));
00183   // Set the data selection parameters
00184  
00185   virtual  Bool setDataPerMS(const String& msname, const String& mode, 
00186                              const Vector<Int>& nchan, 
00187                              const Vector<Int>& start,
00188                              const Vector<Int>& step,
00189                              const Vector<Int>& spectralwindowids,
00190                              const Vector<Int>& fieldid,
00191                              const String& msSelect="",
00192                              const String& timerng="",
00193                              const String& fieldnames="",
00194                              const Vector<Int>& antIndex=Vector<Int>(),
00195                              const String& antnames="",
00196                              const String& spwstring="",
00197                              const String& uvdist="",
00198                              const String& scan="");
00199 
00200 
00201   Bool setdata(const String& mode, const Vector<Int>& nchan, 
00202                const Vector<Int>& start,
00203                const Vector<Int>& step, const MRadialVelocity& mStart,
00204                const MRadialVelocity& mStep,
00205                const Vector<Int>& spectralwindowids,
00206                const Vector<Int>& fieldid,
00207                const String& msSelect="",
00208                const String& timerng="",
00209                const String& fieldnames="",
00210                const Vector<Int>& antIndex=Vector<Int>(),
00211                const String& antnames="",
00212                const String& spwstring="",
00213                const String& uvdist="",
00214                const String& scan="");
00215   
00216   // Set the processing options
00217   Bool setoptions(const String& ftmachine, const Long cache, const Int tile,
00218                   const String& gridfunction, const MPosition& mLocation,
00219                   const Float padding, const Bool usemodelcol=True, 
00220                   const Int wprojplanes=1,
00221                   const String& epJTableName="",
00222                   const Bool applyPointingOffsets=True,
00223                   const Bool doPointingCorrection=True,
00224                   const String& cfCacheDirName="", 
00225                   const Float& pastep=5.0,
00226                   const Float& pbLimit=5.0e-2);
00227 
00228   // Set the single dish processing options
00229   Bool setsdoptions(const Float scale, const Float weight, 
00230                     const Int convsupport=-1);
00231 
00232   // Set the voltage pattern
00233   Bool setvp(const Bool dovp,
00234              const Bool defaultVP,
00235              const String& vpTable,
00236              const Bool doSquint,
00237              const Quantity &parAngleInc,
00238              const Quantity &skyPosThreshold,
00239              String defaultTel="");
00240 
00241   // Set the scales to be searched in Multi Scale clean
00242   Bool setscales(const String& scaleMethod,          // "nscales"  or  "uservector"
00243                  const Int inscales,
00244                  const Vector<Float>& userScaleSizes);
00245   // Set the number of taylor series terms in the expansion of the
00246   // image as a function of frequency.
00247   Bool settaylorterms(const Int intaylor);
00248 
00249   // </group>
00250   
00251   // Advise on suitable values
00252   Bool advise(const Bool takeAdvice, const Float amplitudeloss,
00253               const Quantity& fieldOfView,
00254               Quantity& cell, Int& npixels, Int& facets,
00255               MDirection& phaseCenter);
00256 
00257   // Output a summary of the state of the object
00258   Bool summary();
00259   
00260   // Return the state of the object as a string
00261   String state();
00262   
00263   // Return the image coordinates
00264   Bool imagecoordinates(CoordinateSystem& coordInfo);
00265 
00266   // Return the image shape
00267   IPosition imageshape() const;
00268 
00269   // Weight the MeasurementSet
00270   Bool weight(const String& algorithm, const String& rmode,
00271               const Quantity& noise, const Double robust,
00272               const Quantity& fieldofview, const Int npixels);
00273   
00274   // Filter the MeasurementSet
00275   Bool filter(const String& type, const Quantity& bmaj, const Quantity& bmin,
00276               const Quantity& bpa);
00277   
00278   // Apply a uvrange
00279   Bool uvrange(const Double& uvmin, const Double& uvmax);
00280   
00281   // Sensitivity
00282   Bool sensitivity(Quantity& pointsourcesens, Double& relativesens, Double& sumwt);
00283   
00284   // Make plain image
00285   Bool makeimage(const String& type, const String& imageName);
00286 
00287   // Make plain image: keep the complex image as well
00288   Bool makeimage(const String& type, const String& imageName,
00289              const String& complexImageName);
00290   
00291   // Fill in a region of a mask
00292   Bool boxmask(const String& mask, const Vector<Int>& blc,
00293                const Vector<Int>& trc, const Float value);
00294 
00295   //Make a region either from record or array of blc trc 
00296   //(Matrix(nboxes,4)) into a mask image
00297   //value is the value of the mask pixels
00298   Bool regionmask(const String& maskimage, Record* imageRegRec, 
00299                   Matrix<Quantity>& blctrcs, const Float& value=1.0);
00300 
00301   static Bool regionToImageMask(const String& maskimage, Record* imageRegRec, 
00302                                 Matrix<Quantity>& blctrcs, 
00303                                 const Float& value=1.0);
00304   // Clip on Stokes I
00305   Bool clipimage(const String& image, const Quantity& threshold);
00306 
00307   // Make a mask image
00308   Bool mask(const String& mask, const String& imageName,
00309             const Quantity& threshold);
00310   
00311   // Restore
00312   Bool restore(const Vector<String>& model, const String& complist,
00313                const Vector<String>& image, const Vector<String>& residual);
00314 
00315   // Setbeam
00316   Bool setbeam(const Quantity& bmaj, const Quantity& bmin, const Quantity& bpa);
00317 
00318   // Residual
00319   Bool residual(const Vector<String>& model, const String& complist,
00320                const Vector<String>& image);
00321 
00322   // Approximate PSF
00323   Bool approximatepsf(const String& psf);
00324 
00325   // Smooth
00326   Bool smooth(const Vector<String>& model, 
00327               const Vector<String>& image, Bool usefit,
00328               Quantity& bmaj, Quantity& bmin, Quantity& bpa,
00329               Bool normalizeVolume);
00330 
00331   // Clean algorithm
00332   Bool clean(const String& algorithm,
00333              const Int niter, 
00334              const Float gain, 
00335              const Quantity& threshold, 
00336              const Bool displayProgress, 
00337              const Vector<String>& model, const Vector<Bool>& fixed,
00338              const String& complist,
00339              const Vector<String>& mask,
00340              const Vector<String>& restored,
00341              const Vector<String>& residual,
00342              const Vector<String>& psf=Vector<String>(0));
00343   
00344   // MEM algorithm
00345   Bool mem(const String& algorithm,
00346            const Int niter, const Quantity& sigma, 
00347            const Quantity& targetflux,
00348            const Bool constrainflux,
00349            const Bool displayProgress, 
00350            const Vector<String>& model, const Vector<Bool>& fixed,
00351            const String& complist,
00352            const Vector<String>& prior,
00353            const Vector<String>& mask,
00354            const Vector<String>& restored,
00355            const Vector<String>& residual);
00356   
00357   // pixon algorithm
00358   Bool pixon(const String& algorithm,
00359              const Quantity& sigma, 
00360              const String& model);
00361   
00362   // NNLS algorithm
00363   Bool nnls(const String& algorithm, const Int niter, const Float tolerance,
00364             const Vector<String>& model, const Vector<Bool>& fixed,
00365             const String& complist,
00366             const Vector<String>& fluxMask, const Vector<String>& dataMask,
00367             const Vector<String>& restored,
00368             const Vector<String>& residual);
00369 
00370   // Multi-field control parameters
00371   Bool setmfcontrol(const Float cyclefactor,
00372                     const Float cyclespeedup,
00373                     const Int stoplargenegatives, 
00374                     const Int stoppointmode,
00375                     const String& scaleType,
00376                     const Float  minPB,
00377                     const Float constPB,
00378                     const Vector<String>& fluxscale);
00379   
00380   // Feathering algorithm
00381   Bool feather(const String& image,
00382                const String& highres,
00383                const String& lowres,
00384                const String& lowpsf);
00385   
00386   // Apply or correct for Primary Beam or Voltage Pattern
00387   Bool pb(const String& inimage,
00388           const String& outimage,
00389           const String& incomps,
00390           const String& outcomps,
00391           const String& operation,
00392           const MDirection& pointngCenter,
00393           const Quantity& pa,
00394           const String& pborvp);
00395 
00396   // Make a linear mosaic of several images
00397   Bool linearmosaic(const String& mosaic,
00398                     const String& fluxscale,
00399                     const String& sensitivity,
00400                     const Vector<String>& images,
00401                     const Vector<Int>& fieldids);
00402   
00403   // Fourier transform the model and componentlist
00404   Bool ft(const Vector<String>& model, const String& complist,
00405           Bool incremental=False);
00406 
00407   // Compute the model visibility using specified source flux densities
00408   Bool setjy(const Int fieldid, const Int spectralwindowid,
00409              const Vector<Double>& fluxDensity, const String& standard);
00410   Bool setjy(const Vector<Int>& fieldid, const Vector<Int>& spectralwindowid, 
00411              const String& fieldnames, const String& spwstring, 
00412              const Vector<Double>& fluxDensity, const String& standard);
00413 
00414   Bool setjy(const Vector<Int>& fieldid, 
00415              const Vector<Int>& spectralwindowid, 
00416              const String& fieldnames, const String& spwstring, 
00417              const String& model,
00418              const Vector<Double>& fluxDensity, const String& standard);
00419 
00420   // Make an empty image
00421   Bool make(const String& model);
00422 
00423   // make a model from a SD image. 
00424   // This model then can be used as initial clean model to include the 
00425   // shorter spacing.
00426   Bool makemodelfromsd(const String& sdImage, const String& modelimage,
00427                        const String& lowPSF,
00428                        String& maskImage);
00429 
00430   // Clone an image
00431   Bool clone(const String& imageName, const String& newImageName);
00432   
00433   // Fit the psf
00434   Bool fitpsf(const String& psf, Quantity& mbmaj, Quantity& mbmin,
00435               Quantity& mbpa);
00436 
00437   // Correct the visibility data (OBSERVED->CORRECTED)
00438   Bool correct(const Bool doparallactic, const Quantity& t);
00439 
00440   // Plot the uv plane
00441   Bool plotuv(const Bool rotate);
00442 
00443   // Plot the visibilities
00444   Bool plotvis(const String& type, const Int increment);
00445 
00446   // Plot the weights
00447   Bool plotweights(const Bool gridded, const Int increment);
00448 
00449   // Plot a summary
00450   Bool plotsummary();
00451 
00452   // Clip visibilities
00453   Bool clipvis(const Quantity& threshold);
00454 
00455 
00456   //This is necessary for setting from the DO...but once its set properly from 
00457   // the constructor...these two functions should go 
00458 
00459   PGPlotter& getPGPlotter();
00460   void setPGPlotter(PGPlotter& thePlotter);
00461 
00462   //Check if can proceed with this object
00463   Bool valid() const;
00464 
00465 
00466   //Interactive mask drawing
00467   Int interactivemask(const String& imagename, const String& maskname, 
00468                       Int& niter, Int& ncycles, String& threshold);
00469 
00470 protected:
00471 
00472   MeasurementSet* ms_p;
00473   MSHistoryHandler *hist_p;
00474   Table antab_p;
00475   Table datadesctab_p;
00476   Table feedtab_p;
00477   Table fieldtab_p;
00478   Table obstab_p;
00479   Table pointingtab_p;
00480   Table poltab_p;
00481   Table proctab_p;
00482   Table spwtab_p;
00483   Table statetab_p;
00484   Table dopplertab_p;
00485   Table flagcmdtab_p;
00486   Table freqoffsettab_p;
00487   Table historytab_p;
00488   Table sourcetab_p;
00489   Table syscaltab_p;
00490   Table weathertab_p;
00491   Int lockCounter_p;
00492   Int nx_p, ny_p, npol_p, nchan_p;
00493   ObsInfo latestObsInfo_p;  
00494   
00495 
00496 
00497 
00498   String msname_p;
00499   MeasurementSet *mssel_p;
00500   VisSet *vs_p;
00501   FTMachine *ft_p;
00502   ComponentFTMachine *cft_p;
00503   SkyEquation* se_p;
00504   CleanImageSkyModel* sm_p;
00505   VPSkyJones* vp_p;
00506   VPSkyJones* gvp_p;
00507 
00508   Bool setimaged_p, nullSelect_p;
00509   Bool redoSkyModel_p;   // if clean is run multiply ..use this to check
00510                          // if setimage was changed hence redo the skyModel.
00511   Float paStep_p, pbLimit_p;
00512   Int facets_p;
00513   Int wprojPlanes_p;
00514   Quantity mcellx_p, mcelly_p;
00515   String stokes_p;
00516   String dataMode_p, imageMode_p;
00517   Vector<Int> dataNchan_p;
00518   Int imageNchan_p;
00519   Vector<Int> dataStart_p, dataStep_p;
00520   Int imageStart_p, imageStep_p;
00521   MRadialVelocity mDataStart_p, mImageStart_p;
00522   MRadialVelocity mDataStep_p,  mImageStep_p;
00523   MFrequency mfImageStart_p, mfImageStep_p;
00524   MDirection phaseCenter_p;
00525   Quantity restFreq_p;
00526   Quantity distance_p;
00527   Bool doShift_p;
00528   Quantity shiftx_p;
00529   Quantity shifty_p;
00530   String ftmachine_p, gridfunction_p;
00531   Bool wfGridding_p;
00532   Long cache_p;
00533   Int  tile_p;
00534   MPosition mLocation_p;
00535   Bool doVP_p;
00536   Quantity bmaj_p, bmin_p, bpa_p;
00537   Bool beamValid_p;
00538   Float padding_p;
00539   Float sdScale_p;
00540   Float sdWeight_p;
00541   Int sdConvSupport_p;
00542   // special mf control parms, etc
00543   Float cyclefactor_p;
00544   Float cyclespeedup_p;
00545   Int stoplargenegatives_p;
00546   Int stoppointmode_p;
00547   Vector<String> fluxscale_p;
00548   String scaleType_p;           // type of image-plane scaling: NONE, SAULT
00549   Float minPB_p;                // minimum value of generalized-PB pattern
00550   Float constPB_p;              // above this level, constant flux-scale
00551 
00552   Vector<Int> spectralwindowids_p;
00553   Int fieldid_p;
00554 
00555   Vector<Int> dataspectralwindowids_p;
00556   Vector<Int> datadescids_p;
00557   Vector<Int> datafieldids_p;
00558 
00559   String telescope_p;
00560   String vpTableStr_p;         // description of voltage patterns for various telescopes
00561                                //  in the MS
00562   Quantity parAngleInc_p;
00563   Quantity skyPosThreshold_p;
00564   BeamSquint::SquintType  squintType_p;
00565   Bool doDefaultVP_p;          // make default VPs, rather than reading in a vpTable
00566 
00567   PGPlotter* pgplotter_p;
00568 
00569   Bool  doMultiFields_p;      // Do multiple fields?
00570   Bool  multiFields_p;        // multiple fields have been specified in setdata
00571 
00572   Bool doWideBand_p;          // Do Multi Frequency Synthesis Imaging
00573 
00574   // Set the defaults
00575   void defaults();
00576 
00577   // check if it is  dettahced from ms.
00578   Bool detached() const;
00579 
00580   // Create the FTMachines when necessary or when the control parameters
00581   // have changed. 
00582   Bool createFTMachine();
00583 
00584   Bool removeTable(const String& tablename);
00585 
00586   Bool createSkyEquation(const String complist="");
00587   Bool createSkyEquation(const Vector<String>& image, 
00588                          const Vector<Bool>& fixed,
00589                          const String complist="");
00590   Bool createSkyEquation(const Vector<String>& image, 
00591                          const String complist="");
00592   Bool createSkyEquation(const Vector<String>& image, 
00593                          const Vector<Bool>& fixed,
00594                          const Vector<String>& mask,
00595                          const String complist="");
00596   Bool createSkyEquation(const Vector<String>& image, 
00597                          const Vector<Bool>& fixed,
00598                          const Vector<String>& mask,
00599                          const Vector<String>& fluxMask,
00600                          const String complist="");
00601   void destroySkyEquation();
00602 
00603   // Add the residuals to the SkyEquation
00604   Bool addResidualsToSkyEquation(const Vector<String>& residual);
00605 
00606   // Add or replace the masks
00607   Bool addMasksToSkyEquation(const Vector<String>& mask);
00608 
00609   // Get the rest frequency ..returns 1 element in restfreq 
00610   // if user specified or try to get the info from the SOURCE table 
00611   Bool getRestFreq(Vector<Double>& restFreq, const Int& spw);
00612 
00613   Bool restoreImages(const Vector<String>& restored);
00614 
00615   // names of flux scale images
00616   Bool writeFluxScales(const Vector<String>& fluxScaleNames);
00617 
00618   String imageName();
00619 
00620   Bool pbguts(ImageInterface<Float>& in,  
00621               ImageInterface<Float>& out, 
00622               const MDirection&,
00623               const Quantity&);
00624 
00625   Bool assertDefinedImageParameters() const;
00626  // Virtual methods to set the ImageSkyModel and SkyEquation.
00627   // This allows derived class pimager to set parallelized
00628   // specializations.
00629   //
00630   virtual void setWFCleanImageSkyModel() 
00631     {sm_p = new WFCleanImageSkyModel(facets_p, wfGridding_p); return;}; 
00632     
00633   virtual void setClarkCleanImageSkyModel()
00634     {sm_p = new ClarkCleanImageSkyModel(); return;};
00635   virtual void setSkyEquation();
00636     
00637   virtual void savePSF(const Vector<String>& psf);
00638 
00639   String frmtTime(const Double time);
00640 
00641  
00642   ComponentList* componentList_p;
00643 
00644   String scaleMethod_p;   // "nscales"   or  "uservector"
00645   Int nscales_p;
00646   Int ntaylor_p;
00647   Vector<Float> userScaleSizes_p;
00648   Bool scaleInfoValid_p;  // This means that we have set the information, not the scale beams
00649 
00650   Int nmodels_p;
00651   // Everything here must be a real class since we make, handle and
00652   // destroy these.
00653   Block<CountedPtr<PagedImage<Float> > > images_p;
00654   Block<CountedPtr<PagedImage<Float> > > masks_p;
00655   Block<CountedPtr<PagedImage<Float> > > fluxMasks_p;
00656   Block<CountedPtr<PagedImage<Float> > > residuals_p;
00657   
00658   // Freq frame is good and valid conversions can be done (or not)
00659   Bool freqFrameValid_p;
00660 
00661   // Preferred complex polarization representation
00662   SkyModel::PolRep polRep_p;
00663 
00664   //Whether to use model column or use it in memory on the fly
00665   Bool useModelCol_p;
00666 
00667   //sink used to store history mainly
00668   LogSink logSink_p;
00669 
00670 
00671   //
00672   // Objects required for pointing correction (ftmachine=PBWProject)
00673   //
00674   EPJones *epJ;
00675   String epJTableName_p, cfCacheDirName_p;
00676   Bool doPointing, doPBCorr;
00677   SimplePlotterPtr plotter_p;
00678   Record interactiveState_p;
00679 
00680   //Track moving source stuff
00681   Bool doTrackSource_p;
00682   MDirection trackDir_p;
00683     
00684 
00685 };
00686 
00687 
00688 } //# NAMESPACE CASA - END
</