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_TRANSFORM2_AWPROJECTFT_H
30 #define SYNTHESIS_TRANSFORM2_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 
66 
67 #include <casa/OS/Timer.h>
68 
69 namespace casa { //# NAMESPACE CASA - BEGIN
70 
71  // namespace vi
72  // {
73  // class VisBuffer2;
74  // class VisibilityIterator2;
75  // }
76  // <summary> An FTMachine for Gridded Fourier transforms including effects of primary beam and pointing offsets and the w-term</summary>
77 
78  // <use visibility=export>
79 
80  // <reviewed reviewer="" date="" tests="" demos="">
81 
82  // <prerequisite>
83  // <li> <linkto class=FTMachine>FTMachine</linkto> module
84  // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
85  // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
86  // <li> <linto class=EPJones>EPJones</linkto> module
87  // </prerequisite>
88  //
89  // <etymology>
90  // FTMachine is a Machine for Fourier Transforms. Like
91  // WProjectFT, AWProjectFT does Grid-based Fourier transforms but
92  // also includes the effects of primary beam and antenna pointing
93  // offsets.
94  // </etymology>
95  //
96  // <synopsis>
97  //
98  // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be
99  // able to perform Fourier transforms on visibility
100  // data. AWProjectFT allows efficient handling of direction
101  // dependent effects due to the primary beam and antenna pointing
102  // offsets using a <linkto class=VisBuffer>VisBuffer</linkto> which
103  // encapsulates a chunk of visibility (typically all baselines for
104  // one time) together with all the information needed for processing
105  // (e.g. UVW coordinates).
106  //
107  // Using this FTMachine, errors due antenna pointing offsets can be
108  // corrected during deconvolution. One form of antenna pointing
109  // error which is known a-priori is the VLA polarization squint
110  // (about 6% of the Primary beam width at any frequency). For
111  // casacore::Stokes imaging, using this FTMachine, the VLA polarization squint
112  // and beam polarization can also be corrected. Also since the
113  // effects of antenna pointing errors is strongest in the range of
114  // 1-2GHz band (where the sky is not quite empty while the beams are
115  // not too large either), this FTMachine can also be setup to
116  // correct for the w-term.
117  //
118  // Switches are provided in the get() method to compute the
119  // derivatives with respect to the parameters of the primary beam
120  // (only pointing offsets for now). This is used in the pointing
121  // offset solver.
122  //
123  // See the documentation of other FTMachines for details about the
124  // design of the FTMachines in general.
125  //
126  // </synopsis>
127  //
128  // <example>
129  // See the example for <linkto class=SkyModel>SkyModel</linkto>.
130  // </example>
131  //
132  // <motivation>
133  //
134  // Encapsulate the correction of direction dependent effects via
135  // visibility plane convolutions with a potentially different
136  // convolution function for each baseline.
137  //
138  // </motivation>
139  //
140  // <todo asof="2005/07/21">
141  //
142  // <ul> Include the antenna based complex gain term as well since
143  // that can interfere with the effects of pointing offsets.
144  //
145  // <ul> Factor out the actual convolution functions as a separate
146  // class making FTMachines for various direction dependent effects
147  // generic.
148  //
149  // </todo>
150 
151  // class EPJones;
152  class SolvableVisJones;
153  namespace refim{
154  class AWProjectFT : public FTMachine {
155  public:
156  static ATerm* createTelescopeATerm(const casacore::String& telescopeName,
157  const casacore::Bool& isATermOn);
159  const casacore::Bool aTermOn,
160  const casacore::Bool psTermOn,
161  const casacore::Bool wTermOn,
162  const casacore::Bool mTermOn,
163  const casacore::Bool wBAWP,
164  const casacore::Bool conjBeams);
165  AWProjectFT();
166 
167  // Constructor: cachesize is the size of the cache in words
168  // (e.g. a few million is a good number), tilesize is the
169  // size of the tile used in gridding (cannot be less than
170  // 12, 16 works in most cases).
171  // <group>
176  casacore::Bool applyPointingOffset=true,
177  casacore::Bool doPBCorr=true,
179  casacore::Float pbLimit=5e-4,
180  casacore::Bool usezero=false,
184  // </group>
185 
186  // Construct from a casacore::Record containing the AWProjectFT state
187  AWProjectFT(const casacore::RecordInterface& stateRec);
188 
189  // Copy constructor
190  AWProjectFT(const AWProjectFT &other);
191 
192  // Assignment operator
193  AWProjectFT &operator=(const AWProjectFT &other);
194 
195  ~AWProjectFT();
196 
197  // void setEPJones(EPJones* ep_j) {epJ = ep_j;}
198  void setEPJones(SolvableVisJones* ep_j) {epJ_p = ep_j;}
199 
200  virtual void setDOPBCorrection(casacore::Bool doit=true) {doPBCorrection=doit;};
202  virtual void setConjBeams(casacore::Bool useit=true) {conjBeams_p=useit;};
204 
205  virtual casacore::Float getPBLimit() {return pbLimit_p;};
206  // Initialize transform to Visibility plane using the image
207  // as a template. The image is loaded and Fourier transformed.
208 
209  void setObservatoryLocation(const casacore::MPosition& mLocation) {mLocation_p=mLocation;};
210 
211  // Vectorized version of initializeToVis. Required since
212  // MultiTermFTM needs vectorized version. And this is implemented
213  // in FTMachine (the baseclass). And one relies on static_cast in
214  // Imager::createFTMachine() (or is it in CSE?) to cast the
215  // pointer to specific types such that this methods gets called
216  // when the FTMachine pointer is of type AWProjectFT.
222  const vi::VisBuffer2& vb);
223 
225  const vi::VisBuffer2& vb);
226  // This version returns the gridded vis...should be used in conjunction
227  // with the version of 'get' that needs the gridded visdata
229  const vi::VisBuffer2& vb, casacore::Array<casacore::Complex>& griddedVis,
231 
232  // Finalize transform to Visibility plane: flushes the image
233  // cache and shows statistics if it is being used.
234  virtual void finalizeToVis();
235 
236  // Initialize transform to Sky plane: initializes the image
238  const vi::VisBuffer2& vb);
239 
240  // Finalize transform to Sky plane: flushes the image
241  // cache and shows statistics if it is being used. DOES NOT
242  // DO THE FINAL TRANSFORM!
243  virtual void finalizeToSky();
244 
245  virtual void initVisBuffer(vi::VisBuffer2& vb, Type whichVBColumn);
246  void initVisBuffer(vi::VisBuffer2& vb, Type whichVBColumn, casacore::Int row);
247 
248  // Get actual coherence from grid by degridding
249  void get(vi::VisBuffer2& vb, casacore::Int row=-1);
250 
251  // Get the coherence from grid return it in the degrid
252  // is used especially when scratch columns are not
253  // present in ms.
254  void get(vi::VisBuffer2& vb, casacore::Cube<casacore::Complex>& degrid,
256  casacore::Int row=-1);
257 
258  void get(vi::VisBuffer2& vb, casacore::Cube<casacore::Float>& pointingOffsets, casacore::Int row=-1,
260  {
261  get(vb,vb,vb,pointingOffsets,row,whichVBColumn,whichVBColumn,Conj,0);
262  }
263 
264  void get(vi::VisBuffer2& vb, vi::VisBuffer2& gradAzVB,vi::VisBuffer2& gradElVB,
265  casacore::Cube<casacore::Float>& pointingOffsets,casacore::Int row=-1,
266  Type whichVBColumn=FTMachine::MODEL,
267  Type whichGradVBColumn=FTMachine::MODEL,
268  casacore::Int Conj=0, casacore::Int doGrad=1) ;
269  void nget(vi::VisBuffer2& vb,
270  // These offsets should be appropriate for the VB
275  casacore::Int Conj=0, casacore::Int doGrad=1);
276  // Get the coherence from grid return it in the degrid
277  // is used especially when scratch columns are not
278  // present in ms.
279  void get(vi::VisBuffer2& vb, casacore::Cube<casacore::Complex>& degrid,
281  casacore::Cube<casacore::Float>& pointingOffsets,casacore::Int row=-1);
282 
283 
284  // Put coherence to grid by gridding.
285  void put(const vi::VisBuffer2&,
288  {
289  // throw(casacore::AipsError("AWProjectFT::put is not implemented"));
290  }
291  void put(const vi::VisBuffer2& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
293 
294  // Make the entire image using a ROVisIter
295  // virtual void makeImage(FTMachine::Type,
296  // ROVisibilityIterator&,
297  // casacore::ImageInterface<casacore::Complex>&,
298  // casacore::Matrix<casacore::Float>&) {};
299 
300  // Make the entire image
301  // void makeImage(FTMachine::Type type,
302  // VisSet& vs,
303  // casacore::ImageInterface<casacore::Complex>& image,
304  // casacore::Matrix<casacore::Float>& weight);
305 
306  // Get the final image: do the Fourier transform and
307  // grid-correct, then optionally normalize by the summed weights
309 
310  // Get the final weights image
312 
313  // Save and restore the AWProjectFT to and from a record
316 
317  // Can this FTMachine be represented by Fourier convolutions?
318  casacore::Bool isFourier() {return true;}
319 
320  // casacore::Bool changed(const VisBuffer& vb) {return vpSJ->changed(vb,1);};
321  // casacore::Bool changed(const VisBuffer& vb) {return false;}
322 
324  casacore::Bool Evaluate=true);
327  casacore::Bool Evaluate=true);
329  {
330  // if (!rotateApertureOTP_p) return currentCFPA;
331  // else return getPA(vb);
332  return getPA(vb);
333  };
337  casacore::MEpoch& last);
338  //
339  // Make a sensitivity image (sensitivityImage), given the gridded
340  // weights (wtImage). These are related to each other by a
341  // Fourier transform and normalization by the sum-of-weights
342  // (sumWt) and normalization by the product of the 2D FFT size
343  // along each axis. If doFFTNorm=false, normalization by the FFT
344  // size is not done. If sumWt is not provided, normalization by
345  // the sum of weights is also not done.
346  //
348  casacore::ImageInterface<casacore::Float>&,// sensitivityImage,
349  const casacore::Matrix<casacore::Float>&,// sumWt=casacore::Matrix<casacore::Float>(),
350  const casacore::Bool& ) {};
351  virtual void makeSensitivityImage(const vi::VisBuffer2& vb,
352  const casacore::ImageInterface<casacore::Complex>& imageTemplate,
354 
355  //
356  // Given the sky image (Fourier transform of the visibilities),
357  // sum of weights and the sensitivity image, this method replaces
358  // the skyImage with the normalized image of the sky.
359  //
360  // These are now implement in the FTMachine base class.
361  //
362  // These can't be left here since now the design depends on
363  // getting the correct version called due to static type casting
364  // of FTM pointer and not on inheretance and and specialization
365  // via overloading.
366 
367  // virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage,
368  // const casacore::Matrix<casacore::Double>& sumOfWts,
369  // casacore::Lattice<casacore::Float>& sensitivityImage,
370  // casacore::Bool fftNorm=true);
371  // virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage,
372  // const casacore::Matrix<casacore::Double>& sumOfWts,
373  // casacore::Lattice<casacore::Float>& sensitivityImage,
374  // casacore::Lattice<casacore::Complex>& sensitivitySqImage,
375  // casacore::Bool fftNorm=true);
376 
380 
381  void makeConjPolMap(const vi::VisBuffer2& vb, const casacore::Vector<casacore::Int> cfPolMap,
382  casacore::Vector<casacore::Int>& conjPolMap);
383  // casacore::Vector<casacore::Int> makeConjPolMap(const VisBuffer& vb);
384  void makeCFPolMap(const vi::VisBuffer2& vb, const casacore::Vector<casacore::Int>& cfstokes,
386  // void reset() {vpSJ->reset();}
388 
389  void setPAIncrement(const casacore::Quantity &computePAIncr, const casacore::Quantity &rotateOTFPAIncr);
390 
392  virtual casacore::String name() const { return "AWProjectFT";};
394  {return verifyShapes(pb.shape(),sky.shape());}
395 
397  {return verifyShapes(pb.shape(),sky.shape());}
398 
400 
401  inline virtual casacore::Float pbFunc(const casacore::Float& a, const casacore::Float& limit)
402  {casacore::Float tt=sqrt(a);return (abs(tt) >= limit)?tt:1.0;};
403  // {if (abs(a) >= limit) return (a);else return 1.0;};
404 
405  inline virtual casacore::Complex pbFunc(const casacore::Complex& a, const casacore::Float& limit)
406  {if (abs(a)>=limit) return (a); else return casacore::Complex(1.0,0.0);};
407 
408  virtual void setMiscInfo(const casacore::Int qualifier)
409  {
412  }
413  virtual void ComputeResiduals(vi::VisBuffer2&vb, casacore::Bool useCorrected);
414  void makeWBCFWt(CFStore2& cfs,const casacore::Double imRefFreq);
415 
417  {
418  return self_p;
419  }
420 
422  // Image Scaling and offset
424  protected:
425 
427  // Locate convolution functions on the disk
428  // casacore::Int locateConvFunction(const casacore::Int Nw, const casacore::Float pa);
429  // void cacheConvFunction(casacore::Int which, casacore::Array<casacore::Complex>& cf, casacore::CoordinateSystem& coord);
430  // Find the convolution function
432  const vi::VisBuffer2& vb);
433 
434  // Get the appropriate data pointer
436 
437  void ok();
438 
439  void init();
440  // virtual void initPolInfo(const vi::VisBuffer2& vb);
441  // Is this record on Grid? check both ends. This assumes that the
442  // ends bracket the middle
444 
445  // Padding in FFT
447 
449  // Image cache
451 
452  // Sizes
455 
456  // Gridder
458 
459  // Is this tiled?
461 
462  // casacore::Array lattice
464 
465  // Lattice. For non-tiled gridding, this will point to arrayLattice,
466  // whereas for tiled gridding, this points to the image
468 
470 
471  // Useful IPositions
473 
474  // // Image Scaling and offset
475  // casacore::Vector<casacore::Double> uvScale, uvOffset;
476 
477 
478  // casacore::DirectionCoordinate directionCoord;
480 
481  // Grid/degrid zero spacing points?
483 
484  // casacore::CountedPtr<ConvolutionFunction> telescopeConvFunc_p;
485  // CFStore cfs_p, cfwts_p;
486  // casacore::Array<casacore::Complex> convFunc_p, convWeights_p;
487  //
488  // casacore::Vector to hold the support size info. for the convolution
489  // functions pointed to by the elements of convFunctions_p. The
490  // co-ordinates of this array are (W-term, Poln, PA).
491  //
492  casacore::Int // convSize,
494 
495  //
496  // The average PB for sky image normalization
497  //
500  //
501  // No. of vis. polarization planes used in making the user defined
502  // casacore::Stokes images
503  //
505  //
506  // Percentage of the peak of the PB after which the image is set
507  // to zero.
508  //
513 
514  // casacore::CountedPtr<CFCache> cfCache_p;
517 
521 
526  //
527  //----------------------------------------------------------------------
528  //
529  virtual void normalizeAvgPB();
533  const vi::VisBuffer2& vb, casacore::Bool& dopsf);
535  const vi::VisBuffer2& vb, casacore::Bool& dopsf);
537  const vi::VisBuffer2& vb);
538 
539  virtual void makeThGridCoords(VBStore& vbs, const casacore::Vector<casacore::Int>& gridShape);
540  virtual void setupVBStore(VBStore& vbs,
541  const vi::VisBuffer2& vb,
542  const casacore::Matrix<casacore::Float>& imagingweight,
543  const casacore::Cube<casacore::Complex>& visData,
545  const casacore::Cube<casacore::Int>& flagCube,
547  const casacore::Bool& doPSF,
548  const casacore::Vector<casacore::Int> &gridShape);
549 
550  // AWVisResampler visResampler_p;
555  //casacore::CountedPtr<CFStore2> cfs2_p, cfwts2_p;
557 
560 
563 
565 
568 
569 #include "AWProjectFT.FORTRANSTUFF.INC"
570  };
571 } //# NAMESPACE CASA - END
572 };
573 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
casacore::Double currentCFPA
Definition: AWProjectFT.h:522
casacore::Vector< casacore::Float > pbPeaks
Definition: AWProjectFT.h:520
virtual casacore::String name() const
Return the name of the machine.
Definition: AWProjectFT.h:392
casacore::Long cachesize
Sizes.
Definition: AWProjectFT.h:453
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
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:347
void setObservatoryLocation(const casacore::MPosition &mLocation)
Initialize transform to Visibility plane using the image as a template.
Definition: AWProjectFT.h:209
virtual casacore::Double getVBPA(const vi::VisBuffer2 &vb)
Definition: AWProjectFT.h:328
casacore::Bool conjBeams_p
Definition: AWProjectFT.h:512
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:122
casacore::Matrix< casacore::Double > sumCFWeight
Definition: FTMachine.h:432
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 vi::VisBuffer2 &vb)
Vectorized version of initializeToVis.
casacore::Vector< casacore::Float > paList
Definition: AWProjectFT.h:520
void makeConjPolMap(const vi::VisBuffer2 &vb, const casacore::Vector< casacore::Int > cfPolMap, casacore::Vector< casacore::Int > &conjPolMap)
void findConvFunction(const casacore::ImageInterface< casacore::Complex > &image, const vi::VisBuffer2 &vb)
Locate convolution functions on the disk casacore::Int locateConvFunction(const casacore::Int Nw...
casacore::Vector< casacore::Double > uvScale
Image Scaling and offset.
Definition: AWProjectFT.h:423
casacore::Int convSampling
casacore::CountedPtr&lt;ConvolutionFunction&gt; telescopeConvFunc_p; CFStore cfs_p, cfwts_p; casacore::Arra...
Definition: AWProjectFT.h:493
casacore::Array< casacore::Float > m_offsets
Definition: AWProjectFT.h:519
static ATerm * createTelescopeATerm(const casacore::String &telescopeName, const casacore::Bool &isATermOn)
virtual void setDOPBCorrection(casacore::Bool doit=true)
Definition: AWProjectFT.h:200
casacore::CountedPtr< casacore::Lattice< casacore::Complex > > arrayLattice
casacore::Array lattice
Definition: AWProjectFT.h:463
void put(const vi::VisBuffer2 &, casacore::TempImage< casacore::Complex > &, casacore::Vector< casacore::Double > &, int, casacore::UVWMachine *, casacore::Bool)
Put coherence to grid by gridding.
Definition: AWProjectFT.h:285
casacore::Double getPA(const vi::VisBuffer2 &vb)
casacore::Int nWPlanes_p
Definition: AWProjectFT.h:448
virtual Type type()
Return the type enum.
virtual casacore::Bool verifyAvgPB(casacore::ImageInterface< casacore::Float > &pb, casacore::ImageInterface< casacore::Complex > &sky)
Definition: AWProjectFT.h:396
//////////////////////////////////////////////////////////////////////////
Definition: Utils.h:193
casacore::IPosition offsetLoc
Definition: AWProjectFT.h:472
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:377
virtual const casacore::CountedPtr< refim::FTMachine > & getFTM2(const casacore::Bool)
Definition: AWProjectFT.h:416
void getWeightImage(casacore::ImageInterface< casacore::Float > &, casacore::Matrix< casacore::Float > &)
Get the final weights image.
casacore::CountedPtr< casacore::Lattice< casacore::Complex > > lattice
Lattice.
Definition: AWProjectFT.h:467
casacore::Vector< casacore::Int > & getPolMap()
Definition: AWProjectFT.h:391
casacore::Double imRefFreq_p
Definition: AWProjectFT.h:522
casacore::MDirection::Convert makeCoordinateMachine(const vi::VisBuffer2 &, const casacore::MDirection::Types &, const casacore::MDirection::Types &, casacore::MEpoch &last)
virtual casacore::Bool doublePrecGrid()
return whether the ftmachine is using a double precision grid
virtual void ComputeResiduals(vi::VisBuffer2 &vb, casacore::Bool useCorrected)
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual void resampleDataToGrid(casacore::Array< casacore::Complex > &griddedData, VBStore &vbs, const vi::VisBuffer2 &vb, casacore::Bool &dopsf)
void reset()
void reset() {vpSJ-&gt;reset();}
Definition: AWProjectFT.h:387
casacore::Vector< casacore::Double > uvOffset
Definition: AWProjectFT.h:423
casacore::Int nint(casacore::Double val)
Definition: AWProjectFT.h:426
LatticeExprNode floor(const LatticeExprNode &expr)
casacore::Float maxAbsData
Definition: AWProjectFT.h:469
A Measure: instant in time.
Definition: MEpoch.h:104
casacore::Float pbLimit_p
Definition: FTMachine.h:527
casacore::MDirection::Convert * pointingToImage
// Image Scaling and offset casacore::Vector&lt;casacore::Double&gt; uvScale, uvOffset; ...
Definition: AWProjectFT.h:479
casacore::Bool makingPSF
Definition: AWProjectFT.h:512
virtual void initVisBuffer(vi::VisBuffer2 &vb, Type whichVBColumn)
virtual casacore::Bool getConjBeams()
Definition: AWProjectFT.h:203
casacore::Unit Second
Definition: AWProjectFT.h:518
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Definition: MDirection.h:188
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:405
defines physical units
Definition: Unit.h:189
Mueller::MuellerType muellerType(const Jones::JonesType &jtype, const VisVector::VisType &vtype)
Return Mueller type according to underlying Jones and VisVector types.
long Long
Definition: aipstype.h:52
casacore::Array< casacore::Complex > * getDataPointer(const casacore::IPosition &, casacore::Bool)
Get the appropriate data pointer.
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > avgPBSq_p
Definition: AWProjectFT.h:499
virtual void setConjBeams(casacore::Bool useit=true)
Definition: AWProjectFT.h:202
casacore::Int doPointing
Definition: AWProjectFT.h:511
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
virtual void normalizeAvgPB()
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
virtual void resampleGridToData(VBStore &vbs, casacore::Array< casacore::Complex > &griddedData, const vi::VisBuffer2 &vb)
virtual casacore::Bool verifyShapes(casacore::IPosition shape0, casacore::IPosition shape1)
casacore::CountedPtr< SolvableVisJones > epJ_p
Percentage of the peak of the PB after which the image is set to zero.
Definition: AWProjectFT.h:509
casacore::Bool fromRecord(const casacore::RecordInterface &inRec)
double Double
Definition: aipstype.h:55
virtual casacore::Bool getDOPBCorrection()
Definition: AWProjectFT.h:201
void setEPJones(SolvableVisJones *ep_j)
void setEPJones(EPJones* ep_j) {epJ = ep_j;}
Definition: AWProjectFT.h:198
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type...
AWProjectFT & operator=(const AWProjectFT &other)
Assignment operator.
casacore::Array< casacore::Complex > griddedData
casacore::Array for non-tiled gridding These are common to most FTmachines
Definition: FTMachine.h:523
casacore::Bool isTiled
Is this tiled?
Definition: AWProjectFT.h:460
casacore::Int lastIndex_p
Definition: AWProjectFT.h:493
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)
void setPAIncrement(const casacore::Quantity &computePAIncr, const casacore::Quantity &rotateOTFPAIncr)
casacore::Int previousSPWID_p
Definition: AWProjectFT.h:564
Type
Types of known Images that may be made using the makeImage method.
Definition: FTMachine.h:127
casacore::Float padding_p
Padding in FFT.
Definition: AWProjectFT.h:446
void makeWBCFWt(CFStore2 &cfs, const casacore::Double imRefFreq)
LatticeExprNode sqrt(const LatticeExprNode &expr)
casacore::Bool pbNormalized_p
Definition: AWProjectFT.h:524
casacore::Vector< casacore::Int > CFMap_p
Definition: AWProjectFT.h:556
Converts UVW coordinates between coordinate systems.
Definition: UVWMachine.h:160
casacore::CountedPtr< casacore::ImageInterface< casacore::Float > > avgPB_p
The average PB for sky image normalization.
Definition: AWProjectFT.h:498
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool doPBCorrection
Definition: AWProjectFT.h:512
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:408
virtual casacore::Bool verifyAvgPB(casacore::ImageInterface< casacore::Float > &pb, casacore::ImageInterface< casacore::Float > &sky)
Definition: AWProjectFT.h:393
casacore::CountedPtr< VisibilityResamplerBase > visResampler_p
AWVisResampler visResampler_p;.
Definition: AWProjectFT.h:551
virtual void finalizeToVis()
Finalize transform to Visibility plane: flushes the image cache and shows statistics if it is being u...
casacore::Double rotateOTFPAIncr_p
Definition: AWProjectFT.h:516
casacore::Bool usezero_p
Grid/degrid zero spacing points?
Definition: AWProjectFT.h:482
measure the time it takes to execute parts of a program
Definition: Timer.h:127
float Float
Definition: aipstype.h:54
casacore::Array< casacore::Float > l_offsets
Definition: AWProjectFT.h:519
Functor to apply complex function conj.
Definition: Functors.h:525
casacore::Double cfRefFreq_p
Definition: AWProjectFT.h:522
A (masked) subset of an ImageInterface object.
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
virtual void setupVBStore(VBStore &vbs, const vi::VisBuffer2 &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)
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const vi::VisBuffer2 &vb)
Initialize transform to Sky plane: initializes the image.
casacore::Timer timer_p
Definition: AWProjectFT.h:558
simple 1-D array
virtual void finalizeToSky()
Finalize transform to Sky plane: flushes the image cache and shows statistics if it is being used...
casacore::Bool toRecord(casacore::RecordInterface &outRec, casacore::Bool withImage=false)
Save and restore the AWProjectFT to and from a record.
ParAngleChangeDetector paChangeDetector
casacore::CountedPtr&lt;CFCache&gt; cfCache_p;
Definition: AWProjectFT.h:515
casacore::CountedPtr< refim::FTMachine > self_p
Definition: AWProjectFT.h:566
The base class to represent the Aperture-Term of the Measurement Equation.
Definition: ATerm.h:65
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)
Make the entire image using a ROVisIter virtual void makeImage(FTMachine::Type, ROVisibilityIterator&amp;...
const Double e
e and functions thereof:
virtual casacore::Int findPointingOffsets(const vi::VisBuffer2 &, 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::Int tilesize
Definition: AWProjectFT.h:454
casacore::Unit Radian
Definition: AWProjectFT.h:518
virtual void reset()
reset to the state which exists just after construction
casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
Definition: AWProjectFT.h:318
SolvableVisJones
casacore::Vector< casacore::Int > ConjCFMap_p
casacore::CountedPtr&lt;CFStore2&gt; cfs2_p, cfwts2_p;
Definition: AWProjectFT.h:556
virtual void makeThGridCoords(VBStore &vbs, const casacore::Vector< casacore::Int > &gridShape)
casacore::Vector< casacore::Int > polMap
Definition: FTMachine.h:438
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Int wConvSize
Definition: AWProjectFT.h:493
casacore::CountedPtr< refim::VB2CFBMap > vb2CFBMap_p
Definition: AWProjectFT.h:567
casacore::Vector< casacore::Bool > paNdxProcessed_p
Definition: AWProjectFT.h:525
casacore::Double runTime1_p
Definition: AWProjectFT.h:559
casacore::String sensitivityPatternQualifierStr_p
Definition: AWProjectFT.h:553
casacore::MPosition mLocation_p
Default Position used for phase rotations.
Definition: FTMachine.h:444
Abstract base class for Record classes.
casacore::Bool recordOnGrid(const vi::VisBuffer2 &vb, casacore::Int rownr) const
virtual void initPolInfo(const vi::VisBuffer2&amp; vb); Is this record on Grid? check both ends...
casacore::IPosition centerLoc
Useful IPositions.
Definition: AWProjectFT.h:472
casacore::Int maxConvSupport
No.
Definition: AWProjectFT.h:504
virtual casacore::Matrix< casacore::Double > & getSumOfCFWeights()
Definition: AWProjectFT.h:379
casacore::Double computePAIncr_p
Definition: AWProjectFT.h:516
casacore::Float lastPAUsedForWtImg
Definition: AWProjectFT.h:523
casacore::ConvolveGridder< casacore::Double, casacore::Complex > * gridder
Gridder.
Definition: AWProjectFT.h:457
virtual casacore::Matrix< casacore::Double > & getSumOfWeights()
Definition: AWProjectFT.h:378
void makeCFPolMap(const vi::VisBuffer2 &vb, const casacore::Vector< casacore::Int > &cfstokes, casacore::Vector< casacore::Int > &polM)
casacore::Vector&lt;casacore::Int&gt; makeConjPolMap(const VisBuffer&amp; vb);
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:395
casacore::LatticeCache< casacore::Complex > * imageCache
Image cache.
Definition: AWProjectFT.h:450
PolOuterProduct::MuellerType muellerType_p
Definition: AWProjectFT.h:561
casacore::Int sensitivityPatternQualifier_p
Definition: AWProjectFT.h:552
virtual casacore::Float getPBLimit()
Definition: AWProjectFT.h:205
void nget(vi::VisBuffer2 &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)
virtual casacore::Float pbFunc(const casacore::Float &a, const casacore::Float &limit)
Definition: AWProjectFT.h:401
casacore::Double sigma
Definition: AWProjectFT.h:510
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
Definition: FTMachine.h:432
static String toString(const T &value)
Convert a value to a String.
Definition: String.h:614