00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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 {
00036 class MeasurementSet;
00037 template<class T> class ImageInterface;
00038 class VisImagingWeight;
00039 class SynthesisImagerVi2 : public SynthesisImager
00040 {
00041
00042 public:
00043
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
00143 virtual void runMajorCycle(const Bool dopsf=False, const Bool savemodel=False);
00144
00145
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
00159 Block<const MeasurementSet *> mss_p;
00160 vi::FrequencySelections fselections_p;
00161 CountedPtr<vi::VisibilityIterator2> vi_p;
00162
00163
00164 };
00165 }
00166
00167 #endif
00168