casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AWProjectFT.h
Go to the documentation of this file.
1 //# AWProjectFT.h: Definition for AWProjectFT
2 //# Copyright (C) 1996,1997,1998,1999,2000,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef SYNTHESIS_AWPROJECTFT_H
30 #define SYNTHESIS_AWPROJECTFT_H
31 
35 //#include <synthesis/MeasurementComponents/ConvolutionFunction.h>
41 //#include <synthesis/MeasurementComponents/CFCache.h>
43 
45 #include <msvis/MSVis/VisBuffer.h>
46 
47 #include <casa/Containers/Block.h>
48 #include <casa/Arrays/Array.h>
49 #include <casa/Arrays/Vector.h>
50 #include <casa/Arrays/Matrix.h>
51 
61 
65 
66 #include <casa/OS/Timer.h>
67 
68 namespace casa { //# NAMESPACE CASA - BEGIN
69 
70  // <summary> An FTMachine for Gridded Fourier transforms including effects of primary beam and pointing offsets and the w-term</summary>
71 
72  // <use visibility=export>
73 
74  // <reviewed reviewer="" date="" tests="" demos="">
75 
76  // <prerequisite>
77  // <li> <linkto class=FTMachine>FTMachine</linkto> module
78  // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
79  // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
80  // <li> <linto class=EPJones>EPJones</linkto> module
81  // </prerequisite>
82  //
83  // <etymology>
84  // FTMachine is a Machine for Fourier Transforms. Like
85  // WProjectFT, AWProjectFT does Grid-based Fourier transforms but
86  // also includes the effects of primary beam and antenna pointing
87  // offsets.
88  // </etymology>
89  //
90  // <synopsis>
91  //
92  // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be
93  // able to perform Fourier transforms on visibility
94  // data. AWProjectFT allows efficient handling of direction
95  // dependent effects due to the primary beam and antenna pointing
96  // offsets using a <linkto class=VisBuffer>VisBuffer</linkto> which
97  // encapsulates a chunk of visibility (typically all baselines for
98  // one time) together with all the information needed for processing
99  // (e.g. UVW coordinates).
100  //
101  // Using this FTMachine, errors due antenna pointing offsets can be
102  // corrected during deconvolution. One form of antenna pointing
103  // error which is known a-priori is the VLA polarization squint
104  // (about 6% of the Primary beam width at any frequency). For
105  // casacore::Stokes imaging, using this FTMachine, the VLA polarization squint
106  // and beam polarization can also be corrected. Also since the
107  // effects of antenna pointing errors is strongest in the range of
108  // 1-2GHz band (where the sky is not quite empty while the beams are
109  // not too large either), this FTMachine can also be setup to
110  // correct for the w-term.
111  //
112  // Switches are provided in the get() method to compute the
113  // derivatives with respect to the parameters of the primary beam
114  // (only pointing offsets for now). This is used in the pointing
115  // offset solver.
116  //
117  // See the documentation of other FTMachines for details about the
118  // design of the FTMachines in general.
119  //
120  // </synopsis>
121  //
122  // <example>
123  // See the example for <linkto class=SkyModel>SkyModel</linkto>.
124  // </example>
125  //
126  // <motivation>
127  //
128  // Encapsulate the correction of direction dependent effects via
129  // visibility plane convolutions with a potentially different
130  // convolution function for each baseline.
131  //
132  // </motivation>
133  //
134  // <todo asof="2005/07/21">
135  //
136  // <ul> Include the antenna based complex gain term as well since
137  // that can interfere with the effects of pointing offsets.
138  //
139  // <ul> Factor out the actual convolution functions as a separate
140  // class making FTMachines for various direction dependent effects
141  // generic.
142  //
143  // </todo>
144 
145  // class EPJones;
146  class SolvableVisJones;
147  class AWProjectFT : public FTMachine {
148  public:
149  static ATerm* createTelescopeATerm(const casacore::String& telescopeName,
150  const casacore::Bool& isATermOn);
152  const casacore::Bool aTermOn,
153  const casacore::Bool psTermOn,
154  const casacore::Bool wTermOn,
155  const casacore::Bool mTermOn,
156  const casacore::Bool wBAWP,
157  const casacore::Bool conjBeams);
158  AWProjectFT();
159 
160  // Constructor: cachesize is the size of the cache in words
161  // (e.g. a few million is a good number), tilesize is the
162  // size of the tile used in gridding (cannot be less than
163  // 12, 16 works in most cases).
164  // <group>
169  casacore::Bool applyPointingOffset=true,
170  casacore::Bool doPBCorr=true,
172  casacore::Float pbLimit=5e-4,
173  casacore::Bool usezero=false,
177  // </group>
178 
179  // Construct from a casacore::Record containing the AWProjectFT state
180  AWProjectFT(const casacore::RecordInterface& stateRec);
181 
182  // Copy constructor
183  AWProjectFT(const AWProjectFT &other);
184 
185  // Assignment operator
186  AWProjectFT &operator=(const AWProjectFT &other);
187 
188  ~AWProjectFT();
189 
190  // void setEPJones(EPJones* ep_j) {epJ = ep_j;}
191  void setEPJones(SolvableVisJones* ep_j) {epJ_p = ep_j;}
192 
193  virtual void setDOPBCorrection(casacore::Bool doit=true) {doPBCorrection=doit;};
195  virtual void setConjBeams(casacore::Bool useit=true) {conjBeams_p=useit;};
197 
198  virtual casacore::Float getPBLimit() {return pbLimit_p;};
199  // Initialize transform to Visibility plane using the image
200  // as a template. The image is loaded and Fourier transformed.
201 
202  void setObservatoryLocation(const casacore::MPosition& mLocation) {mLocation_p=mLocation;};
203 
204  // Vectorized version of initializeToVis. Required since
205  // MultiTermFTM needs vectorized version. And this is implemented
206  // in FTMachine (the baseclass). And one relies on static_cast in
207  // Imager::createFTMachine() (or is it in CSE?) to cast the
208  // pointer to specific types such that this methods gets called
209  // when the FTMachine pointer is of type AWProjectFT.
215  const VisBuffer& vb);
216 
218  const VisBuffer& vb);
219  // This version returns the gridded vis...should be used in conjunction
220  // with the version of 'get' that needs the gridded visdata
222  const VisBuffer& vb, casacore::Array<casacore::Complex>& griddedVis,
224 
225  // Finalize transform to Visibility plane: flushes the image
226  // cache and shows statistics if it is being used.
227  virtual void finalizeToVis();
228 
229  // Initialize transform to Sky plane: initializes the image
231  const VisBuffer& vb);
232 
233  // Finalize transform to Sky plane: flushes the image
234  // cache and shows statistics if it is being used. DOES NOT
235  // DO THE FINAL TRANSFORM!
236  virtual void finalizeToSky();
237 
238  virtual void initVisBuffer(VisBuffer& vb, Type whichVBColumn);
239  void initVisBuffer(VisBuffer& vb, Type whichVBColumn, casacore::Int row);
240 
241  // Get actual coherence from grid by degridding
242  void get(VisBuffer& vb, casacore::Int row=-1);
243 
244  // Get the coherence from grid return it in the degrid
245  // is used especially when scratch columns are not
246  // present in ms.
247  void get(VisBuffer& vb, casacore::Cube<casacore::Complex>& degrid,
249  casacore::Int row=-1);
250 
251  void get(VisBuffer& vb, casacore::Cube<casacore::Float>& pointingOffsets, casacore::Int row=-1,
252  Type whichVBColumn=FTMachine::MODEL,casacore::Int Conj=0)
253  {
254  get(vb,vb,vb,pointingOffsets,row,whichVBColumn,whichVBColumn,Conj,0);
255  }
256 
257  void get(VisBuffer& vb, VisBuffer& gradAzVB,VisBuffer& gradElVB,
258  casacore::Cube<casacore::Float>& pointingOffsets,casacore::Int row=-1,
259  Type whichVBColumn=FTMachine::MODEL,
260  Type whichGradVBColumn=FTMachine::MODEL,
261  casacore::Int Conj=0, casacore::Int doGrad=1) ;
262  void nget(VisBuffer& vb,
263  // These offsets should be appropriate for the VB
268  casacore::Int Conj=0, casacore::Int doGrad=1);
269  // Get the coherence from grid return it in the degrid
270  // is used especially when scratch columns are not
271  // present in ms.
272  void get(VisBuffer& vb, casacore::Cube<casacore::Complex>& degrid,
274  casacore::Cube<casacore::Float>& pointingOffsets,casacore::Int row=-1);
275 
276 
277  // Put coherence to grid by gridding.
278  void put(const VisBuffer&,
281  {
282  // throw(casacore::AipsError("AWProjectFT::put is not implemented"));
283  }
284  void put(const VisBuffer& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
286 
287  // Make the entire image using a ROVisIter
292 
293  // Make the entire image
295  VisSet& vs,
298 
299  // Get the final image: do the Fourier transform and
300  // grid-correct, then optionally normalize by the summed weights
302 
303  // Get the final weights image
305 
306  // Save and restore the AWProjectFT to and from a record
309 
310  // Can this FTMachine be represented by Fourier convolutions?
311  casacore::Bool isFourier() {return true;}
312 
313  // casacore::Bool changed(const VisBuffer& vb) {return vpSJ->changed(vb,1);};
314  // casacore::Bool changed(const VisBuffer& vb) {return false;}
315 
317  casacore::Bool Evaluate=true);
320  casacore::Bool Evaluate=true);
321  virtual casacore::Double getVBPA(const VisBuffer& vb)
322  {
323  // if (!rotateApertureOTP_p) return currentCFPA;
324  // else return getPA(vb);
325  return getPA(vb);
326  };
330  casacore::MEpoch& last);
331  //
332  // Make a sensitivity image (sensitivityImage), given the gridded
333  // weights (wtImage). These are related to each other by a
334  // Fourier transform and normalization by the sum-of-weights
335  // (sumWt) and normalization by the product of the 2D FFT size
336  // along each axis. If doFFTNorm=false, normalization by the FFT
337  // size is not done. If sumWt is not provided, normalization by
338  // the sum of weights is also not done.
339  //
341  casacore::ImageInterface<casacore::Float>&,// sensitivityImage,
342  const casacore::Matrix<casacore::Float>&,// sumWt=casacore::Matrix<casacore::Float>(),
343  const casacore::Bool& ) {};
344  virtual void makeSensitivityImage(const VisBuffer& vb, const casacore::ImageInterface<casacore::Complex>& imageTemplate,
346 
347  //
348  // Given the sky image (Fourier transform of the visibilities),
349  // sum of weights and the sensitivity image, this method replaces
350  // the skyImage with the normalized image of the sky.
351  //
352  // These are now implement in the FTMachine base class.
353  //
354  // These can't be left here since now the design depends on
355  // getting the correct version called due to static type casting
356  // of FTM pointer and not on inheretance and and specialization
357  // via overloading.
358 
359  // virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage,
360  // const casacore::Matrix<casacore::Double>& sumOfWts,
361  // casacore::Lattice<casacore::Float>& sensitivityImage,
362  // casacore::Bool fftNorm=true);
363  // virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage,
364  // const casacore::Matrix<casacore::Double>& sumOfWts,
365  // casacore::Lattice<casacore::Float>& sensitivityImage,
366  // casacore::Lattice<casacore::Complex>& sensitivitySqImage,
367  // casacore::Bool fftNorm=true);
368 
372 
374  // casacore::Vector<casacore::Int> makeConjPolMap(const VisBuffer& vb);
376  // void reset() {vpSJ->reset();}
378 
379  void setPAIncrement(const casacore::Quantity &computePAIncr, const casacore::Quantity &rotateOTFPAIncr);
380 
382  virtual casacore::String name() const { return "AWProjectFT";};
384  {return verifyShapes(pb.shape(),sky.shape());}
385 
387  {return verifyShapes(pb.shape(),sky.shape());}
388 
390 
391  inline virtual casacore::Float pbFunc(const casacore::Float& a, const casacore::Float& limit)
392  {casacore::Float tt=sqrt(a);return (abs(tt) >= limit)?tt:1.0;};
393  // {if (abs(a) >= limit) return (a);else return 1.0;};
394 
395  inline virtual casacore::Complex pbFunc(const casacore::Complex& a, const casacore::Float& limit)
396  {if (abs(a)>=limit) return (a); else return casacore::Complex(1.0,0.0);};
397 
398  virtual void setMiscInfo(const casacore::Int qualifier)
399  {
402  }
403  virtual void ComputeResiduals(VisBuffer&vb, casacore::Bool useCorrected);
404  void makeWBCFWt(CFStore2& cfs,const casacore::Double imRefFreq);
405 
407  // Image Scaling and offset
409  protected:
410 
412  // Locate convolution functions on the disk
413  // casacore::Int locateConvFunction(const casacore::Int Nw, const casacore::Float pa);
414  // void cacheConvFunction(casacore::Int which, casacore::Array<casacore::Complex>& cf, casacore::CoordinateSystem& coord);
415  // Find the convolution function
417  const VisBuffer& vb);
418 
419  // Get the appropriate data pointer
421 
422  void ok();
423 
424  void init();
425  // virtual void initPolInfo(const VisBuffer& vb);
426  // Is this record on Grid? check both ends. This assumes that the
427  // ends bracket the middle
428  casacore::Bool recordOnGrid(const VisBuffer& vb, casacore::Int rownr) const;
429 
430  // Padding in FFT
432 
434  // Image cache
436 
437  // Sizes
440 
441  // Gridder
443 
444  // Is this tiled?
446 
447  // casacore::Array lattice
449 
450  // Lattice. For non-tiled gridding, this will point to arrayLattice,
451  // whereas for tiled gridding, this points to the image
453 
455 
456  // Useful IPositions
458 
459  // // Image Scaling and offset
460  // casacore::Vector<casacore::Double> uvScale, uvOffset;
461 
462 
463  // casacore::DirectionCoordinate directionCoord;
465 
466  // Grid/degrid zero spacing points?
468 
469  // casacore::CountedPtr<ConvolutionFunction> telescopeConvFunc_p;
470  // CFStore cfs_p, cfwts_p;
471  // casacore::Array<casacore::Complex> convFunc_p, convWeights_p;
472  //
473  // casacore::Vector to hold the support size info. for the convolution
474  // functions pointed to by the elements of convFunctions_p. The
475  // co-ordinates of this array are (W-term, Poln, PA).
476  //
477  casacore::Int // convSize,
479 
480  //
481  // The average PB for sky image normalization
482  //
485  //
486  // No. of vis. polarization planes used in making the user defined
487  // casacore::Stokes images
488  //
490  //
491  // Percentage of the peak of the PB after which the image is set
492  // to zero.
493  //
498 
499  // casacore::CountedPtr<CFCache> cfCache_p;
502 
506 
511  //
512  //----------------------------------------------------------------------
513  //
514  virtual void normalizeAvgPB();
518  const VisBuffer& vb, casacore::Bool& dopsf);
520  const VisBuffer& vb, casacore::Bool& dopsf);
522  const VisBuffer& vb);
523 
524  virtual void makeThGridCoords(VBStore& vbs, const casacore::Vector<casacore::Int>& gridShape);
525  virtual void setupVBStore(VBStore& vbs,
526  const VisBuffer& vb,
527  const casacore::Matrix<casacore::Float>& imagingweight,
528  const casacore::Cube<casacore::Complex>& visData,
530  const casacore::Cube<casacore::Int>& flagCube,
532  const casacore::Bool& doPSF,
533  const casacore::Vector<casacore::Int> &gridShape);
534 
535  // AWVisResampler visResampler_p;
540  //casacore::CountedPtr<CFStore2> cfs2_p, cfwts2_p;
542 
545 
547 
549 
550 #include "AWProjectFT.FORTRANSTUFF.INC"
551  };
552 } //# NAMESPACE CASA - END
553 
554 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
casacore::LatticeCache< casacore::Complex > * imageCache
Image cache.
Definition: AWProjectFT.h:435
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > avgPBSq_p
Definition: AWProjectFT.h:484
casacore::Float padding_p
Padding in FFT.
Definition: AWProjectFT.h:431
A Measure: position on Earth.
Definition: MPosition.h:79
casacore::Int maxConvSupport
No.
Definition: AWProjectFT.h:489
int Int
Definition: aipstype.h:50
casacore::Bool pbNormalized_p
Definition: AWProjectFT.h:509
casacore::Vector< casacore::Int > polMap
Definition: FTMachine.h:448
casacore::Vector< casacore::Bool > paNdxProcessed_p
Definition: AWProjectFT.h:510
virtual casacore::Float getPBLimit()
Definition: AWProjectFT.h:198
casacore::Vector< casacore::Double > uvScale
Image Scaling and offset.
Definition: AWProjectFT.h:408
casacore::Matrix< casacore::Double > sumCFWeight
Definition: FTMachine.h:442
virtual casacore::Complex pbFunc(const casacore::Complex &a, const casacore::Float &limit)
{if (abs(a) &gt;= limit) return (a);else return 1.0;};
Definition: AWProjectFT.h:395
void setEPJones(SolvableVisJones *ep_j)
void setEPJones(EPJones* ep_j) {epJ = ep_j;}
Definition: AWProjectFT.h:191
PolOuterProduct::MuellerType muellerType_p
Definition: AWProjectFT.h:546
virtual void setupVBStore(VBStore &vbs, const VisBuffer &vb, const casacore::Matrix< casacore::Float > &imagingweight, const casacore::Cube< casacore::Complex > &visData, const casacore::Matrix< casacore::Double > &uvw, const casacore::Cube< casacore::Int > &flagCube, const casacore::Vector< casacore::Double > &dphase, const casacore::Bool &doPSF, const casacore::Vector< casacore::Int > &gridShape)
casacore::Int nWPlanes_p
Definition: AWProjectFT.h:433
casacore::Bool conjBeams_p
Definition: AWProjectFT.h:497
casacore::CountedPtr< VisibilityResamplerBase > visResampler_p
AWVisResampler visResampler_p;.
Definition: AWProjectFT.h:536
virtual casacore::Matrix< casacore::Double > & getSumOfWeights()
Definition: AWProjectFT.h:370
virtual Type type()
Return the type enum.
casacore::Unit Second
Definition: AWProjectFT.h:503
virtual void initializeToVis(casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > &compImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &modelImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &weightImageVec, casacore::PtrBlock< casacore::SubImage< casacore::Float > * > &fluxScaleVec, casacore::Block< casacore::Matrix< casacore::Float > > &weightsVec, const VisBuffer &vb)
Vectorized version of initializeToVis.
casacore::Float maxAbsData
Definition: AWProjectFT.h:454
virtual casacore::Bool getDOPBCorrection()
Definition: AWProjectFT.h:194
virtual casacore::Bool verifyAvgPB(casacore::ImageInterface< casacore::Float > &pb, casacore::ImageInterface< casacore::Float > &sky)
Definition: AWProjectFT.h:383
casacore::Int tilesize
Definition: AWProjectFT.h:439
casacore::Bool toRecord(casacore::RecordInterface &outRec, casacore::Bool withImage=false)
Save and restore the AWProjectFT to and from a record.
void makeWBCFWt(CFStore2 &cfs, const casacore::Double imRefFreq)
casacore::Double currentCFPA
Definition: AWProjectFT.h:507
virtual casacore::Bool getConjBeams()
Definition: AWProjectFT.h:196
virtual void resampleDataToGrid(casacore::Array< casacore::Complex > &griddedData, VBStore &vbs, const VisBuffer &vb, casacore::Bool &dopsf)
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:409
casacore::Int wConvSize
Definition: AWProjectFT.h:478
void makeConjPolMap(const VisBuffer &vb, const casacore::Vector< casacore::Int > cfPolMap, casacore::Vector< casacore::Int > &conjPolMap)
casacore::Bool isTiled
Is this tiled?
Definition: AWProjectFT.h:445
LatticeExprNode floor(const LatticeExprNode &expr)
casacore::Unit Day
Definition: AWProjectFT.h:503
casacore::MDirection::Convert makeCoordinateMachine(const VisBuffer &, const casacore::MDirection::Types &, const casacore::MDirection::Types &, casacore::MEpoch &last)
A Measure: instant in time.
Definition: MEpoch.h:104
virtual void setDOPBCorrection(casacore::Bool doit=true)
Definition: AWProjectFT.h:193
casacore::Vector< casacore::Int > CFMap_p
Definition: AWProjectFT.h:541
casacore::Array< casacore::Float > l_offsets
Definition: AWProjectFT.h:504
CFStore rotatedConvFunc_p
Definition: AWProjectFT.h:539
casacore::ConvolveGridder< casacore::Double, casacore::Complex > * gridder
Gridder.
Definition: AWProjectFT.h:442
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Definition: MDirection.h:188
casacore::Double runTime1_p
Definition: AWProjectFT.h:544
defines physical units
Definition: Unit.h:189
void setObservatoryLocation(const casacore::MPosition &mLocation)
Initialize transform to Visibility plane using the image as a template.
Definition: AWProjectFT.h:202
Mueller::MuellerType muellerType(const Jones::JonesType &jtype, const VisVector::VisType &vtype)
Return Mueller type according to underlying Jones and VisVector types.
void reset()
void reset() {vpSJ-&gt;reset();}
Definition: AWProjectFT.h:377
casacore::Bool makingPSF
Definition: AWProjectFT.h:497
casacore::Vector< casacore::Float > paList
Definition: AWProjectFT.h:505
long Long
Definition: aipstype.h:52
casacore::Int convSampling
casacore::CountedPtr&lt;ConvolutionFunction&gt; telescopeConvFunc_p; CFStore cfs_p, cfwts_p; casacore::Arra...
Definition: AWProjectFT.h:478
casacore::Float lastPAUsedForWtImg
Definition: AWProjectFT.h:508
static casacore::CountedPtr< ConvolutionFunction > makeCFObject(const casacore::String &telescopeName, const casacore::Bool aTermOn, const casacore::Bool psTermOn, const casacore::Bool wTermOn, const casacore::Bool mTermOn, const casacore::Bool wBAWP, const casacore::Bool conjBeams)
virtual void initVisBuffer(VisBuffer &vb, Type whichVBColumn)
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
casacore::IPosition offsetLoc
Definition: AWProjectFT.h:457
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
virtual casacore::Float pbFunc(const casacore::Float &a, const casacore::Float &limit)
Definition: AWProjectFT.h:391
virtual void finalizeToVis()
Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being u...
virtual void makeImage(FTMachine::Type, ROVisibilityIterator &, casacore::ImageInterface< casacore::Complex > &, casacore::Matrix< casacore::Float > &)
Make the entire image using a ROVisIter.
Definition: AWProjectFT.h:288
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const VisBuffer &vb)
Initialize transform to Sky plane: initializes the image.
CFBStruct cfbst_pub
Definition: AWProjectFT.h:406
casacore::Int sensitivityPatternQualifier_p
Definition: AWProjectFT.h:537
casacore::Vector< casacore::Int > ConjCFMap_p
casacore::CountedPtr&lt;CFStore2&gt; cfs2_p, cfwts2_p;
Definition: AWProjectFT.h:541
double Double
Definition: aipstype.h:55
virtual void reset()
reset to the state which exists just after construction
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type...
casacore::Float pbLimit_p
Definition: FTMachine.h:534
virtual void ComputeResiduals(VisBuffer &vb, casacore::Bool useCorrected)
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual casacore::Int findPointingOffsets(const VisBuffer &, casacore::Array< casacore::Float > &, casacore::Array< casacore::Float > &, casacore::Bool Evaluate=true)
casacore::Bool changed(const VisBuffer&amp; vb) {return vpSJ-&gt;changed(vb,1);}; casacore::Bool changed(con...
casacore::CountedPtr< casacore::Lattice< casacore::Complex > > lattice
Lattice.
Definition: AWProjectFT.h:452
Type
Types of known Images that may be made using the makeImage method.
Definition: FTMachine.h:125
LatticeExprNode sqrt(const LatticeExprNode &expr)
casacore::Array< casacore::Complex > * getDataPointer(const casacore::IPosition &, casacore::Bool)
Get the appropriate data pointer.
casacore::Double getPA(const VisBuffer &vb)
Converts UVW coordinates between coordinate systems.
Definition: UVWMachine.h:160
casacore::Int lastIndex_p
Definition: AWProjectFT.h:478
ParAngleChangeDetector paChangeDetector
casacore::CountedPtr&lt;CFCache&gt; cfCache_p;
Definition: AWProjectFT.h:500
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Timer timer_p
Definition: AWProjectFT.h:543
casacore::MDirection::Convert * pointingToImage
// Image Scaling and offset casacore::Vector&lt;casacore::Double&gt; uvScale, uvOffset; ...
Definition: AWProjectFT.h:464
virtual casacore::ImageInterface< casacore::Float > & getSensitivityImage()
Given the sky image (Fourier transform of the visibilities), sum of weights and the sensitivity image...
Definition: AWProjectFT.h:369
void put(const VisBuffer &, casacore::TempImage< casacore::Complex > &, casacore::Vector< casacore::Double > &, int, casacore::UVWMachine *, casacore::Bool)
Put coherence to grid by gridding.
Definition: AWProjectFT.h:278
measure the time it takes to execute parts of a program
Definition: Timer.h:127
float Float
Definition: aipstype.h:54
//////////////////////////////////////////////////////////////////////////
Definition: Utils.h:184
virtual void normalizeAvgPB()
Functor to apply complex function conj.
Definition: Functors.h:525
AWProjectFT & operator=(const AWProjectFT &other)
Assignment operator.
A (masked) subset of an ImageInterface object.
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
Definition: FTMachine.h:442
casacore::Double computePAIncr_p
Definition: AWProjectFT.h:501
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
virtual casacore::Bool verifyAvgPB(casacore::ImageInterface< casacore::Float > &pb, casacore::ImageInterface< casacore::Complex > &sky)
Definition: AWProjectFT.h:386
casacore::Vector< casacore::Float > pbPeaks
Definition: AWProjectFT.h:505
casacore::Array< casacore::Float > m_offsets
Definition: AWProjectFT.h:504
casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
Definition: AWProjectFT.h:311
casacore::IPosition centerLoc
Useful IPositions.
Definition: AWProjectFT.h:457
casacore::CountedPtr< casacore::ImageInterface< casacore::Float > > avgPB_p
The average PB for sky image normalization.
Definition: AWProjectFT.h:483
simple 1-D array
casacore::Int doPointing
Definition: AWProjectFT.h:496
casacore::CountedPtr< SolvableVisJones > epJ_p
Percentage of the peak of the PB after which the image is set to zero.
Definition: AWProjectFT.h:494
casacore::Bool fromRecord(const casacore::RecordInterface &inRec)
casacore::Double rotateOTFPAIncr_p
Definition: AWProjectFT.h:501
static ATerm * createTelescopeATerm(const casacore::String &telescopeName, const casacore::Bool &isATermOn)
void findConvFunction(const casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)
Locate convolution functions on the disk casacore::Int locateConvFunction(const casacore::Int Nw...
void makeCFPolMap(const VisBuffer &vb, const casacore::Vector< casacore::Int > &cfstokes, casacore::Vector< casacore::Int > &polM)
casacore::Vector&lt;casacore::Int&gt; makeConjPolMap(const VisBuffer&amp; vb);
const Double e
e and functions thereof:
casacore::Vector< casacore::Double > uvOffset
Definition: AWProjectFT.h:408
virtual void setConjBeams(casacore::Bool useit=true)
Definition: AWProjectFT.h:195
void nget(VisBuffer &vb, casacore::Array< casacore::Float > &l_off, casacore::Array< casacore::Float > &m_off, casacore::Cube< casacore::Complex > &Mout, casacore::Cube< casacore::Complex > &dMout1, casacore::Cube< casacore::Complex > &dMout2, casacore::Int Conj=0, casacore::Int doGrad=1)
casacore::CountedPtr< casacore::Lattice< casacore::Complex > > arrayLattice
casacore::Array lattice
Definition: AWProjectFT.h:448
The base class to represent the Aperture-Term of the Measurement Equation.
Definition: ATerm.h:63
SolvableVisJones
casacore::Bool usezero_p
Grid/degrid zero spacing points?
Definition: AWProjectFT.h:467
virtual void makeThGridCoords(VBStore &vbs, const casacore::Vector< casacore::Int > &gridShape)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Unit Radian
Definition: AWProjectFT.h:503
virtual void makeSensitivityImage(casacore::Lattice< casacore::Complex > &, casacore::ImageInterface< casacore::Float > &, const casacore::Matrix< casacore::Float > &, const casacore::Bool &)
Make a sensitivity image (sensitivityImage), given the gridded weights (wtImage). ...
Definition: AWProjectFT.h:340
casacore::Double cfRefFreq_p
Definition: AWProjectFT.h:507
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
casacore::Array< casacore::Complex > griddedData
casacore::Array for non-tiled gridding These are common to most FTmachines
Definition: FTMachine.h:530
virtual casacore::Bool doublePrecGrid()
return whether the ftmachine is using a double precision grid
virtual casacore::Double getVBPA(const VisBuffer &vb)
Definition: AWProjectFT.h:321
casacore::Double imRefFreq_p
Definition: AWProjectFT.h:507
casacore::Vector< casacore::Int > & getPolMap()
Definition: AWProjectFT.h:381
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)
Get the final image: do the Fourier transform and grid-correct, then optionally normalize by the summ...
virtual void finalizeToSky()
Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used...
void setPAIncrement(const casacore::Quantity &computePAIncr, const casacore::Quantity &rotateOTFPAIncr)
casacore::Bool doPBCorrection
Definition: AWProjectFT.h:497
Abstract base class for Record classes.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
virtual casacore::Matrix< casacore::Double > & getSumOfCFWeights()
Definition: AWProjectFT.h:371
virtual casacore::Bool verifyShapes(casacore::IPosition shape0, casacore::IPosition shape1)
casacore::Int nint(casacore::Double val)
Definition: AWProjectFT.h:411
casacore::Long cachesize
Sizes.
Definition: AWProjectFT.h:438
casacore::String sensitivityPatternQualifierStr_p
Definition: AWProjectFT.h:538
casacore::Double sigma
Definition: AWProjectFT.h:495
casacore::Bool recordOnGrid(const VisBuffer &vb, casacore::Int rownr) const
virtual void initPolInfo(const VisBuffer&amp; vb); Is this record on Grid? check both ends...
casacore::Int Nant_p
Definition: AWProjectFT.h:496
virtual casacore::String name() const
Return the name of the machine.
Definition: AWProjectFT.h:382
void getWeightImage(casacore::ImageInterface< casacore::Float > &, casacore::Matrix< casacore::Float > &)
Get the final weights image.
casacore::MPosition mLocation_p
Default Position used for phase rotations.
Definition: FTMachine.h:455
virtual void setMiscInfo(const casacore::Int qualifier)
set the order of the Taylor term for MFS this is to tell A-casacore::Projection to qualify the accumu...
Definition: AWProjectFT.h:398
static String toString(const T &value)
Convert a value to a String.
Definition: String.h:614
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:120
virtual void resampleGridToData(VBStore &vbs, casacore::Array< casacore::Complex > &griddedData, const VisBuffer &vb)