SynthesisImagerVi2.h

Go to the documentation of this file.
00001 //# SynthesisImagerVi2.h: Imager functionality sits here; 
00002 //# Copyright (C) 2016
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 #ifndef SYNTHESIS_SYNTHESISIMAGERVI2_H
00027 #define SYNTHESIS_SYNTHESISIMAGERVI2_H
00028 
00029 #include <synthesis/ImagerObjects/SynthesisImager.h>
00030 #include <synthesis/TransformMachines2/FTMachine.h>
00031 #include <msvis/MSVis/ViFrequencySelection.h>
00032 #include <msvis/MSVis/VisibilityIterator2.h>
00033 #include <msvis/MSVis/VisBuffer2.h>
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 class MeasurementSet;
00037 template<class T> class ImageInterface;
00038 class VisImagingWeight;
00039  class SynthesisImagerVi2  : public SynthesisImager
00040 {
00041 
00042 public:
00043   // Default constructor
00044 
00045   SynthesisImagerVi2();
00046   virtual ~SynthesisImagerVi2();
00047   virtual Bool selectData(const SynthesisParamsSelect& selpars);
00048   virtual Bool defineImage(SynthesisParamsImage& impars, const SynthesisParamsGrid& gridpars);
00049   virtual Bool weight(const String& type="natural", 
00050               const String& rmode="norm",
00051               const Quantity& noise=Quantity(0.0, "Jy"), 
00052               const Double robust=0.0,
00053               const Quantity& fieldofview=Quantity(0.0, "arcsec"),
00054               const Int npixels=0, 
00055               const Bool multiField=False,
00056               const String& filtertype=String("Gaussian"),
00057               const Quantity& filterbmaj=Quantity(0.0,"deg"),
00058               const Quantity& filterbmin=Quantity(0.0,"deg"),
00059               const Quantity& filterbpa=Quantity(0.0,"deg")  );
00060   
00061   Bool setWeightDensity();
00062   void predictModel();
00063 
00064   void dryGridding(const Vector<String>& cfList);
00065   void fillCFCache(const Vector<String>& cfList,
00066                    const String& ftmName,
00067                    const String& cfcPath,
00068                    const Bool& psTermOn,
00069                    const Bool& aTermOn);
00070   void reloadCFCache();
00071 
00072  protected:
00073   void appendToMapperList(String imagename, 
00074                           CoordinateSystem& csys, 
00075                           IPosition imshape,
00076                           CountedPtr<refim::FTMachine>& ftm,
00077                           CountedPtr<refim::FTMachine>& iftm,
00078                           Quantity distance=Quantity(0.0, "m"), 
00079                           Int facets=1, 
00080                           Int chanchunks=1,
00081                           const Bool overwrite=False,
00082                           String mappertype=String("default"),
00083                           Float padding=1.0,
00084                           uInt ntaylorterms=1,
00085                           Vector<String> startmodel=Vector<String>(0));
00086   virtual void unlockMSs();
00087   virtual void createVisSet(const Bool writeaccess=False);
00088   void createFTMachine(CountedPtr<casa::refim::FTMachine>& theFT, 
00089                        CountedPtr<casa::refim::FTMachine>& theIFT,  
00090                        const String& ftname,
00091                        const uInt nTaylorTerms=1, 
00092                        const String mType="default",
00093                        const Int facets=1,
00094                        //------------------------------
00095                        const Int wprojplane=1,
00096                        const Float padding=1.0,
00097                        const Bool useAutocorr=False,
00098                        const Bool useDoublePrec=True,
00099                        const String gridFunction=String("SF"),
00100                        //------------------------------
00101                        const Bool aTermOn    = True,
00102                        const Bool psTermOn   = True,
00103                        const Bool mTermOn    = False,
00104                        const Bool wbAWP      = True,
00105                        const String cfCache  = "",
00106                        const Bool doPointing = False,
00107                        const Bool doPBCorr   = True,
00108                        const Bool conjBeams  = True,
00109                        const Float computePAStep   = 360.0,
00110                        const Float rotatePAStep    = 5.0,
00111                        const String interpolation = String("linear"),
00112                        const Bool freqFrameValid = True,
00113                        const Int cache=1000000000,
00114                        const Int tile=16,
00115                        const String stokes="I",
00116                        const String imageNamePrefix="");
00117 
00118   void createAWPFTMachine(CountedPtr<refim::FTMachine>& theFT, CountedPtr<refim::FTMachine>& theIFT, 
00119                           const String& ftmName,
00120                           const Int facets,          
00121                           //----------------------------
00122                           const Int wprojPlane,     
00123                           const Float padding,      
00124                           const Bool useAutocorr,   
00125                           const Bool useDoublePrec, 
00126                           const String gridFunction,
00127                           //---------------------------
00128                           const Bool aTermOn,      
00129                           const Bool psTermOn,     
00130                           const Bool mTermOn,      
00131                           const Bool wbAWP,        
00132                           const String cfCache,    
00133                           const Bool doPointing,   
00134                           const Bool doPBCorr,     
00135                           const Bool conjBeams,    
00136                           const Float computePAStep,
00137                           const Float rotatePAStep, 
00138                           const Int cache,          
00139                           const Int tile,
00140                           const String imageNamePrefix="");
00141  
00142 // Do the major cycle
00143   virtual void runMajorCycle(const Bool dopsf=False, const Bool savemodel=False);
00144 
00145   // Version of major cycle code with mappers in a loop outside vi/vb.
00146   virtual void runMajorCycle2(const Bool dopsf=False, const Bool savemodel=False);
00147  
00148  void createMosFTMachine(CountedPtr<casa::refim::FTMachine>& theFT, CountedPtr<casa::refim::FTMachine>&  theIFT, const Float  padding, const Bool useAutoCorr, const Bool useDoublePrec, const Float rotatePAStep, const String Stokes="I");
00149   CountedPtr<SIMapper> createSIMapper(String mappertype,  
00150                                       CountedPtr<SIImageStore> imagestore, 
00151                                       CountedPtr<refim::FTMachine> ftmachine,
00152                                       CountedPtr<refim::FTMachine> iftmachine,
00153                                       uInt ntaylorterms=1);
00154 
00155   Bool makePB();
00156   Bool makePrimaryBeam(PBMath& pbMath);
00157  
00158    // Other Options
00159   Block<const MeasurementSet *> mss_p;
00160   vi::FrequencySelections fselections_p;
00161   CountedPtr<vi::VisibilityIterator2>  vi_p;
00162 
00163 
00164 };
00165 } //# NAMESPACE CASA - END
00166 
00167 #endif
00168 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1