casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FTMachine.h
Go to the documentation of this file.
1 //# FTMachine.h: Definition for FTMachine
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
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_FTMACHINE_H
30 #define SYNTHESIS_FTMACHINE_H
31 
35 #include <casa/Arrays/Array.h>
36 #include <casa/Arrays/Vector.h>
37 #include <casa/Arrays/Matrix.h>
38 #include <casa/Logging/LogIO.h>
39 #include <casa/Logging/LogSink.h>
42 #include <casa/Containers/Block.h>
51 
53 #include <images/Images/SubImage.h>
55 
58 #include <iomanip>
59 
60 namespace casacore{
61 
62  class UVWMachine;
63 }
64 
65 namespace casa { //# NAMESPACE CASA - BEGIN
66 
67  class VisSet;
68  class VisBuffer;
69  class ROVisibilityIterator;
70  class VisModelData;
71  class SkyJones;
72 
73 // <summary> defines interface for the Fourier Transform Machine </summary>
74 
75 // <use visibility=export>
76 
77 // <reviewed reviewer="" date="" tests="" demos="">
78 
79 // <prerequisite>
80 // <li> <linkto class=SkyModel>SkyModel</linkto> module
81 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
82 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
83 // </prerequisite>
84 //
85 // <etymology>
86 // FTMachine is a Machine for Fourier Transforms
87 // </etymology>
88 //
89 // <synopsis>
90 // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be able
91 // to perform Fourier transforms on visibility data. FTMachine
92 // allows efficient Fourier Transform processing using a
93 // <linkto class=VisBuffer>VisBuffer</linkto> which encapsulates
94 // a chunk of visibility (typically all baselines for one time)
95 // together with all the information needed for processing
96 // (e.g. UVW coordinates).
97 // </synopsis>
98 //
99 // <example>
100 // A simple example of a FTMachine is found in
101 // <linkto class=GridFT>GridFT</linkto>.
102 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
103 // </example>
104 //
105 // <motivation>
106 // Define an interface to allow efficient processing of chunks of
107 // visibility data
108 //
109 // Note that the image must be Complex. It must contain the
110 // casacore::Complex casacore::Stokes values (e.g. RR,RL,LR,LL). FTMachine
111 // uses the image coordinate system to determine mappings
112 // between the polarization and frequency values in the
113 // casacore::PagedImage and in the VisBuffer.
114 //
115 // </motivation>
116 //
117 // <todo asof="97/10/01">
118 // </todo>
119 
120 class FTMachine {
121 public:
122 
123  //# Enumerations
124  // Types of known Images that may be made using the makeImage method
125  enum Type {
126  OBSERVED=0, // From OBSERVED visibility data (default)
127  MODEL, // From MODEL visibility data
128  CORRECTED, // From CORRECTED visibility data
129  RESIDUAL, // From RESIDUAL (OBSERVED-MODEL) visibility data
130  PSF, // POINT SPREAD FUNCTION
131  COVERAGE, // COVERAGE (SD only)
132  N_types, // Number of types
134  };
135 
136  FTMachine();
137 
138 
140 
141  FTMachine(const FTMachine& other);
142 
143  FTMachine& operator=(const FTMachine& other);
144 
145  void setBasePrivates(const FTMachine& other){FTMachine::operator=(other);}
146 
147  virtual ~FTMachine();
148 
149 
150  //clone copy
151  //the default cloner clones via a Record copy
152  virtual FTMachine* cloneFTM();
153  // Initialize transform to Visibility plane
155 
156  // Vectorized InitializeToVis
162  const VisBuffer& vb);
163 
164  virtual void initializeToVisNew(const VisBuffer& vb,
166 
167  //-------------------------------------------------------------------------------------
168  // Finalize transform to Visibility plane
169  // This is mostly a no-op, and is not-even called from CubeSkyEquation.
170  virtual void finalizeToVis() = 0;
171 
172  // Note : No vectorized form of finalizeToVis yet.....
173 
174  //-------------------------------------------------------------------------------------
175  // Initialize transform to Sky plane
177  casacore::Matrix<casacore::Float>& weight, const VisBuffer& vb) = 0;
178 
179  // Vectorized InitializeToSky
182  const VisBuffer& vb,
183  const casacore::Bool dopsf=false);
184 
185  virtual void initializeToSkyNew(const casacore::Bool dopsf,
186  const VisBuffer& vb,
188 
189  //-------------------------------------------------------------------------------------
190  // Finalize transform to Sky plane
191  virtual void finalizeToSky() = 0;
192 
193  virtual void finalizeToSky(casacore::ImageInterface<casacore::Complex>& iimage){(void)iimage;};
194 
195  // Vectorized finalizeToSky
200  casacore::Bool dopsf,
202 
203  virtual void finalizeToSkyNew(casacore::Bool dopsf,
204  const VisBuffer& vb,
206 
207  //-------------------------------------------------------------------------------------
208 
209  // Get actual coherence from grid
210  virtual void get(VisBuffer& vb, casacore::Int row=-1) = 0;
211 
212 
213  // Put coherence to grid
214  virtual void put(const VisBuffer& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
216 
217  // Non const vb version - so that weights can be modified in-place
218  // Currently, used only by MultiTermFT
219  virtual void put(VisBuffer& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
221  {put((const VisBuffer&)vb,row,dopsf,type);};
222 
223  //-------------------------------------------------------------------------------------
226  const casacore::Bool dopsf);
227 
230 
231  /*
232  virtual void normalizeSumWeight(casacore::ImageInterface<casacore::Float>& inOutImage,
233  casacore::ImageInterface<casacore::Float>& weightImage,
234  const casacore::Bool dopsf);
235  */
236 
238  const casacore::Matrix<casacore::Double>&,// sumOfWts,
239  casacore::Lattice<casacore::Float>&,// sensitivityImage,
240  casacore::Bool /*fftNorm*/){return;};
241 
245  casacore::Bool dopsf, casacore::Float pblimit, casacore::Int normtype);
246 
247 
248  // All FTMachines that fill weightimage, need to set this.
249  // TODO : Make this pure virtual.
250  virtual casacore::Bool useWeightImage(){return false;};
251  virtual casacore::Bool isSkyJonesSet(){return (sj_p.nelements()>0) && !(sj_p[0]).null() ;}
252  virtual casacore::Bool isSkyJonesChanged(VisBuffer& vb, casacore::Int row){if(sj_p.nelements()>0){return sj_p[0]->changed(vb,row);} else {return false;} };
253 
254  // Set SkyJones if image domain corrections /applycation are needed
255  // To reset the the FTMachine for stopping image based correction/applycation
256  // set in a casacore::Vector of size 0.
257  // The pointers have to be handled by the caller ..no delete happening here
259 
260  casacore::Bool changedSkyJonesLogic(const VisBuffer& vb, casacore::Bool& firstRow, casacore::Bool& internalRow);
261 
262 
263  //-------------------------------------------------------------------------------------
264 
265  // Get the gridded visibilities or weight
266  template <typename T> void getGrid(casacore::Array<T>& thegrid);
267  // Get the final image
269 
271 
273  const VisBuffer& /*vb*/) {};
274  // Get the final weights image
276 
277  // Get a flux (divide by this to get a flux density correct image)
278  // image if there is one
280 
281  // Make the entire image
282  virtual void makeImage(FTMachine::Type type,
283  VisSet& vs,
286  // Make the entire image using a ROVisIter
287  virtual void makeImage(FTMachine::Type type,
291 
292  //-------------------------------------------------------------------------------------
293 
294  // Rotate the uvw from the observed phase center to the
295  // desired phase center.
297  const VisBuffer& vb);
299  const VisBuffer& vb);
300 
301  // Refocus on a finite distance
304  casacore::Vector<casacore::Double>& dphase, const VisBuffer& vb);
305 
306  //helper function for openmp to call ...no private dependency
307  static void locateuvw(const casacore::Double*& uvw, const casacore::Double*&dphase, const casacore::Double*& freq, const casacore::Int& nchan, const casacore::Double*& scale, const casacore::Double*& offset, const casacore::Int& sampling, casacore::Int*& loc,casacore::Int*& off, casacore::Complex*& phasor, const casacore::Int& row, const casacore::Bool& doW=false);
308 
309 
310  // Save and restore the FTMachine to and from a record
312  casacore::Bool withImage=false, const casacore::String diskimagename="");
313  virtual casacore::Bool fromRecord(casacore::String& error, const casacore::RecordInterface& inRecord);
314 
315  // Has this operator changed since the last application?
316  virtual casacore::Bool changed(const VisBuffer& vb);
317 
318  // Can this FTMachine be represented by Fourier convolutions?
319  virtual casacore::Bool isFourier() {return false;}
320 
321  //set spw for cube that will be used;
323 
324  //return whether the ftmachine is using a double precision grid
325  virtual casacore::Bool doublePrecGrid();
326 
327  // To make sure no padding is used in certain gridders
328  virtual void setNoPadding(casacore::Bool nopad){(void)nopad;};
329 
330  // Return the name of the machine
331 
332  virtual casacore::String name() const =0;// { return "None";};
333 
334  // set and get the location used for frame
335  void setLocation(const casacore::MPosition& loc);
337 
338  // set a moving source aka planets or comets => adjust phase center
339  // on the fly for gridding
340  virtual void setMovingSource(const casacore::String& sourcename);
341  virtual void setMovingSource(const casacore::MDirection& mdir);
342 
343  //set and get Time to calculate phasecenter -1.0 means using the time available at
344  //each iteration..this is used when the phasecenter in the field table is either
345  //a polynomial or has a ephemerides tables associated with it
346  //Using double in the units and epoch-frame of the ms(s) ..caller is responsible for conversion
349  //reset stuff in an FTMachine
350  virtual void reset(){};
351 
352  //set frequency interpolation type
353  virtual void setFreqInterpolation(const casacore::String& method);
354 
355  //tell ftmachine which Pointing table column to use for Direction
356  //Mosaic or Single dish ft use this for example
357  virtual void setPointingDirColumn(const casacore::String& column="DIRECTION");
358 
360 
361  virtual void setSpwChanSelection(const casacore::Cube<casacore::Int>& spwchansels);
363  virtual void setSpwFreqSelection(const casacore::Matrix<casacore::Double>& spwfreqs);
365 
366  // set the order of the Taylor term for MFS this is to tell
367  // A-casacore::Projection to qualify the accumulated avgPB for each Taylor
368  // term in the CFCache.
369  virtual void setMiscInfo(const casacore::Int qualifier)=0;
370 
373  //
374  // Make the VB and VBStore interefaces for the interim re-factoring
375  // work. Finally removed the VB interface.
376  virtual void ComputeResiduals(VisBuffer&vb, casacore::Bool useCorrected) = 0;
377  virtual casacore::Float getPBLimit() {return pbLimit_p;};
378  //virtual void ComputeResiduals(VBStore& vb)=0;
379  //get and set numthreads
382 
383  virtual void setCFCache(casacore::CountedPtr<CFCache>& cfc, const casacore::Bool resetCFC=true);
385  casacore::String getCacheDir() { return cfCache_p->getCacheDir(); };
386 
387  virtual void setDryRun(casacore::Bool val)
388  {
389  isDryRun=val;
390  //cerr << "FTM: " << isDryRun << endl;
391  };
392  virtual casacore::Bool dryRun() {return isDryRun;}
394  {
395  // cerr << "@#%$@% = " << cfCache_p.nrefs() << endl;
396  return (cfCache_p.nrefs()!=0);
397  }
399 
400 protected:
401 
402  friend class VisModelData;
403  friend class MultiTermFT;
404  friend class MultiTermFTNew;
406 
408 
410 
413 
415 
416  // Direction of desired tangent plane
419 
421 
422  // moving source stuff
426 
427 
429 
431 
434  //Use douple precision grid in gridding process
436 
437  virtual void initMaps(const VisBuffer& vb);
438  virtual void initPolInfo(const VisBuffer& vb);
439 
440 
441  // Sum of weights per polarization and per chan
443 
444  // Sizes
446 
447  // Maps of channels and polarization
449 
450 
451  // Is casacore::Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR.
453 
454  // Default Position used for phase rotations
456 
457  // Set if uvwrotation is necessary
458 
460  virtual void ok();
461 
462  // check if image is big enough for gridding
463 
464  virtual void gridOk (casacore::Int gridsupport);
465 
466 
467  // setup multiple spectral window for cubes
472  const VisBuffer& vb);
473 
474  //redo all spw chan match especially if ms has changed underneath
476 
477  //interpolate visibility data of vb to grid frequency definition
478  //flag will be set the one as described in interpolateArray1D
479  //return false if no interpolation is done...for e.g for nearest case
486  //degridded data interpolated back onto visibilities
490 
491 
492  //Interpolate visibilities to be degridded upon
493  virtual void getInterpolateArrays(const VisBuffer& vb,
495 
496 
497  void setSpectralFlag(const VisBuffer& vb, casacore::Cube<casacore::Bool>& modflagcube);
498 
499  //helper to save Measures in a record
501 
502  // Private variables needed for spectral frame conversion
507  //casacore::Vector of float lsrfreq needed for regridding
516 
520 
523 
527 
528  // casacore::Array for non-tiled gridding
529  // These are common to most FTmachines
532 
533 
535  // casacore::Vector<SkyJones *> sj_p;
537  //A holder for the complex image if nobody else is keeping it
539 
542  private:
543  //Some temporary wasteful function for swapping axes because we don't
544  //Interpolation along the second axis...will need to implement
545  //interpolation on y axis of a cube.
546 
551 
552 
553 };
554 
555 #include <synthesis/TransformMachines/FTMachine.tcc>
556 
557 
558 } //# NAMESPACE CASA - END
559 
560 #endif
561 
562 
563 
casacore::Int polInUse_p
Definition: FTMachine.h:515
virtual casacore::Bool interpolateFrequencyFromgrid(VisBuffer &vb, casacore::Cube< casacore::Complex > &data, FTMachine::Type type=FTMachine::MODEL)
degridded data interpolated back onto visibilities
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)=0
Get the final image.
A Measure: astronomical direction.
Definition: MDirection.h:174
casacore::Int npol
Definition: FTMachine.h:445
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &, const VisBuffer &)
Definition: FTMachine.h:272
virtual const casacore::CountedPtr< ConvolutionFunction > & getAWConvFunc()
Definition: FTMachine.h:270
virtual void setNoPadding(casacore::Bool nopad)
To make sure no padding is used in certain gridders.
Definition: FTMachine.h:328
static void locateuvw(const casacore::Double *&uvw, const casacore::Double *&dphase, const casacore::Double *&freq, const casacore::Int &nchan, const casacore::Double *&scale, const casacore::Double *&offset, const casacore::Int &sampling, casacore::Int *&loc, casacore::Int *&off, casacore::Complex *&phasor, const casacore::Int &row, const casacore::Bool &doW=false)
helper function for openmp to call...no private dependency
A 1-D Specialization of the Array class.
virtual void stokesToCorrelation(casacore::ImageInterface< casacore::Float > &modelImage, casacore::ImageInterface< casacore::Complex > &compImage)
A Measure: position on Earth.
Definition: MPosition.h:79
casacore::CountedPtr< ConvolutionFunction > convFuncCtor_p
Definition: FTMachine.h:521
virtual casacore::Bool isSkyJonesChanged(VisBuffer &vb, casacore::Int row)
Definition: FTMachine.h:252
virtual void makeImage(FTMachine::Type type, VisSet &vs, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
Make the entire image.
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > polMap
Definition: FTMachine.h:448
void convUVW(casacore::Double &dphase, casacore::Vector< casacore::Double > &thisrow)
casacore::CountedPtr< CFCache > cfCache_p
Definition: FTMachine.h:517
virtual void gridOk(casacore::Int gridsupport)
check if image is big enough for gridding
casacore::UVWMachine * uvwMachine_p
Definition: FTMachine.h:411
casacore::Int nx
Sizes.
Definition: FTMachine.h:445
casacore::LogIO & logIO()
casacore::Matrix< casacore::Double > sumCFWeight
Definition: FTMachine.h:442
virtual ~FTMachine()
virtual void initializeToVisNew(const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
casacore::Bool saveMeasure(casacore::RecordInterface &rec, const casacore::String &name, casacore::String &error, const casacore::Measure &ms)
helper to save Measures in a record
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
virtual void finalizeToSky(casacore::ImageInterface< casacore::Complex > &iimage)
Definition: FTMachine.h:193
Object to provide MODEL_DATA visibilities on demand.
Definition: VisModelData.h:147
casacore::Bool freqFrameValid_p
Definition: FTMachine.h:505
casacore::Matrix< casacore::Double > spwFreqSel_p
Definition: FTMachine.h:513
casacore::Bool matchChannel(const casacore::Int &spw, const VisBuffer &vb)
casacore::Vector< casacore::Int > chanMap
Maps of channels and polarization.
Definition: FTMachine.h:448
casacore::uInt nAntenna_p
Definition: FTMachine.h:430
virtual casacore::Float getPBLimit()
Definition: FTMachine.h:377
casacore::Matrix< casacore::Double > expandedSpwConjFreqSel_p
Definition: FTMachine.h:513
virtual Type type()
Return the type enum.
casacore::Cube< casacore::Int > spwChanSelFlag_p
Definition: FTMachine.h:512
virtual void setFreqInterpolation(const casacore::String &method)
set frequency interpolation type
virtual casacore::Bool interpolateFrequencyTogrid(const VisBuffer &vb, const casacore::Matrix< casacore::Float > &wt, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag, casacore::Matrix< casacore::Float > &weight, FTMachine::Type type=FTMachine::OBSERVED)
interpolate visibility data of vb to grid frequency definition flag will be set the one as described ...
casacore::Double distance_p
Definition: FTMachine.h:428
casacore::Block< casacore::Vector< casacore::Int > > multiChanMap_p
setup multiple spectral window for cubes
Definition: FTMachine.h:468
casacore::Vector< casacore::Int > nVisChan_p
Definition: FTMachine.h:470
casacore::Int lastMSId_p
Definition: FTMachine.h:433
virtual void getFluxImage(casacore::ImageInterface< casacore::Float > &image)
Get a flux (divide by this to get a flux density correct image) image if there is one...
Definition: FTMachine.h:279
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Definition: PlotTool.h:43
Container for Measure frame.
Definition: MeasFrame.h:137
void setSpectralFlag(const VisBuffer &vb, casacore::Cube< casacore::Bool > &modflagcube)
Physical quantities within reference frame.
Definition: Measure.h:235
casacore::Vector< casacore::CountedPtr< SkyJones > > sj_p
casacore::Vector&lt;SkyJones *&gt; sj_p;
Definition: FTMachine.h:536
virtual casacore::Bool toRecord(casacore::String &error, casacore::RecordInterface &outRecord, casacore::Bool withImage=false, const casacore::String diskimagename="")
Save and restore the FTMachine to and from a record.
ostream-like interface to creating log messages.
Definition: LogIO.h:167
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const VisBuffer &vb)=0
Note : No vectorized form of finalizeToVis yet....
casacore::Vector< casacore::Double > imageFreq_p
Definition: FTMachine.h:506
virtual void put(const VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)=0
Put coherence to grid.
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:409
casacore::Double getPhaseCenterTime()
Definition: FTMachine.h:348
virtual casacore::Bool changed(const VisBuffer &vb)
Has this operator changed since the last application?
casacore::Vector< casacore::Bool > doConversion_p
Definition: FTMachine.h:504
virtual void setCanComputeResiduals(casacore::Bool &b)
Definition: FTMachine.h:371
virtual void ComputeResiduals(VisBuffer &vb, casacore::Bool useCorrected)=0
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual FTMachine * cloneFTM()
clone copy the default cloner clones via a Record copy
virtual casacore::String name() const =0
Return the name of the machine.
virtual void ok()
casacore::MDirection movingDir_p
moving source stuff
Definition: FTMachine.h:423
virtual void setDryRun(casacore::Bool val)
Definition: FTMachine.h:387
virtual casacore::Bool isUsingCFCache()
Definition: FTMachine.h:393
virtual void put(VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)
Non const vb version - so that weights can be modified in-place Currently, used only by MultiTermFT...
Definition: FTMachine.h:219
CFStore cfs_p
Definition: FTMachine.h:518
virtual void getWeightImage(casacore::ImageInterface< casacore::Float > &weightImage, casacore::Matrix< casacore::Float > &weights)=0
Get the final weights image.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
casacore::Int lastFieldId_p
Definition: FTMachine.h:432
virtual casacore::Bool useWeightImage()
All FTMachines that fill weightimage, need to set this.
Definition: FTMachine.h:250
casacore::CountedPtr< casacore::UVWMachine > phaseShifter_p
Definition: FTMachine.h:412
casacore::Bool setSpw(casacore::Vector< casacore::Int > &spw, casacore::Bool validFrame)
set spw for cube that will be used;
InterpolationMethod
Interpolation methods.
casacore::Bool matchAllSpwChans(const VisBuffer &vb)
redo all spw chan match especially if ms has changed underneath
casacore::MeasFrame mFrame_p
Definition: FTMachine.h:414
casacore::Int nvispol
Definition: FTMachine.h:445
virtual void getInterpolateArrays(const VisBuffer &vb, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag)
Interpolate visibilities to be degridded upon.
virtual casacore::Bool canComputeResiduals()
Definition: FTMachine.h:372
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)=0
Initialize transform to Visibility plane.
virtual void finalizeToVis()=0
Finalize transform to Visibility plane This is mostly a no-op, and is not-even called from CubeSkyEq...
casacore::Double phaseCenterTime_p
Definition: FTMachine.h:541
void setBasePrivates(const FTMachine &other)
Definition: FTMachine.h:145
virtual void setMovingSource(const casacore::String &sourcename)
set a moving source aka planets or comets =&gt; adjust phase center on the fly for gridding ...
FTMachine & operator=(const FTMachine &other)
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
casacore::MDirection firstMovingDir_p
Definition: FTMachine.h:425
void swapyz(casacore::Cube< casacore::Complex > &out, const casacore::Cube< casacore::Complex > &in)
Some temporary wasteful function for swapping axes because we don&#39;t Interpolation along the second ax...
CFStore cfwts_p
Definition: FTMachine.h:518
void setLocation(const casacore::MPosition &loc)
set and get the location used for frame
virtual void setMiscInfo(const casacore::Int qualifier)=0
set the order of the Taylor term for MFS this is to tell A-casacore::Projection to qualify the accumu...
virtual void correlationToStokes(casacore::ImageInterface< casacore::Complex > &compImage, casacore::ImageInterface< casacore::Float > &resImage, const casacore::Bool dopsf)
double Double
Definition: aipstype.h:55
casacore::Float pbLimit_p
Definition: FTMachine.h:534
virtual void setSpwChanSelection(const casacore::Cube< casacore::Int > &spwchansels)
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > cmplxImage_p
A holder for the complex image if nobody else is keeping it.
Definition: FTMachine.h:538
casacore::Bool toVis_p
Definition: FTMachine.h:525
void setnumthreads(casacore::Int n)
virtual void ComputeResiduals(VBStore&amp; vb)=0; get and set numthreads
Type
Types of known Images that may be made using the makeImage method.
Definition: FTMachine.h:125
casacore::LogIO logIO_p
Definition: FTMachine.h:405
Converts UVW coordinates between coordinate systems.
Definition: UVWMachine.h:160
virtual casacore::Matrix< casacore::Double > getSpwFreqSelection()
Definition: FTMachine.h:364
virtual casacore::Bool isSkyJonesSet()
Definition: FTMachine.h:251
casacore::Bool isIOnly
Is casacore::Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR.
Definition: FTMachine.h:452
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void setCFCache(casacore::CountedPtr< CFCache > &cfc, const casacore::Bool resetCFC=true)
casacore::Bool useDoubleGrid_p
Use douple precision grid in gridding process.
Definition: FTMachine.h:435
casacore::CountedPtr< PolOuterProduct > pop_p
Definition: FTMachine.h:522
casacore::Matrix< casacore::Double > expandedSpwFreqSel_p
Definition: FTMachine.h:513
virtual void normalizeImage(casacore::Lattice< casacore::Complex > &, const casacore::Matrix< casacore::Double > &, casacore::Lattice< casacore::Float > &, casacore::Bool)
Definition: FTMachine.h:237
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRecord)
float Float
Definition: aipstype.h:54
casacore::String getCacheDir()
Definition: FTMachine.h:385
void setPhaseCenterTime(const casacore::Double time)
set and get Time to calculate phasecenter -1.0 means using the time available at each iteration...
Definition: FTMachine.h:347
virtual void reset()
reset stuff in an FTMachine
Definition: FTMachine.h:350
A (masked) subset of an ImageInterface object.
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
Definition: FTMachine.h:442
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
template &lt;class T, class U&gt; class vector;
Definition: MSFlagger.h:37
casacore::CountedPtr< CFStore2 > cfs2_p
Definition: FTMachine.h:519
virtual void setSkyJones(casacore::Vector< casacore::CountedPtr< SkyJones > > &sj)
Set SkyJones if image domain corrections /applycation are needed To reset the the FTMachine for stopp...
Interconvert pixel and frequency values.
simple 1-D array
casacore::Bool doUVWRotation_p
Set if uvwrotation is necessary.
Definition: FTMachine.h:459
virtual void finalizeToSky()=0
Finalize transform to Sky plane
casacore::Int getnumthreads()
virtual void initPolInfo(const VisBuffer &vb)
casacore::MPosition & getLocation()
casacore::Int ny
Definition: FTMachine.h:445
casacore::Int nchan
Definition: FTMachine.h:445
casacore::Int numthreads_p
Definition: FTMachine.h:526
casacore::Bool fixMovingSource_p
Definition: FTMachine.h:424
casacore::Vector< casacore::Int > cfStokes_p
Definition: FTMachine.h:514
virtual casacore::Cube< casacore::Int > getSpwChanSelection()
Definition: FTMachine.h:362
casacore::Vector< casacore::Int > selectedSpw_p
Definition: FTMachine.h:469
void girarUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
casacore::InterpolateArray1D< casacore::Double, casacore::Complex >::InterpolationMethod freqInterpMethod_p
Definition: FTMachine.h:510
casacore::Bool tangentSpecified_p
Direction of desired tangent plane.
Definition: FTMachine.h:417
String: the storage and methods of handling collections of characters.
Definition: String.h:223
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
casacore::MDirection mImage_p
Definition: FTMachine.h:420
casacore::CountedPtr< CFStore2 > cfwts2_p
Definition: FTMachine.h:519
virtual casacore::String getPointingDirColumnInUse()
void getGrid(casacore::Array< T > &thegrid)
virtual void setPointingDirColumn(const casacore::String &column="DIRECTION")
tell ftmachine which Pointing table column to use for Direction Mosaic or Single dish ft use this for...
casacore::Bool changedSkyJonesLogic(const VisBuffer &vb, casacore::Bool &firstRow, casacore::Bool &internalRow)
casacore::SpectralCoordinate spectralCoord_p
Private variables needed for spectral frame conversion.
Definition: FTMachine.h:503
Abstract base class for Record classes.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
casacore::Bool isDryRun
Definition: FTMachine.h:398
casacore::CountedPtr< CFCache > getCFCache()
Definition: FTMachine.h:384
casacore::Int nvischan
Definition: FTMachine.h:445
void refocus(casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Int > &ant1, const casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
Refocus on a finite distance.
casacore::Array< casacore::DComplex > griddedData2
Definition: FTMachine.h:531
virtual casacore::Bool dryRun()
Definition: FTMachine.h:392
casacore::String pointingDirCol_p
Definition: FTMachine.h:511
casacore::MPosition mLocation_p
Default Position used for phase rotations.
Definition: FTMachine.h:455
casacore::MDirection mTangent_p
Definition: FTMachine.h:418
virtual void initializeToSkyNew(const casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
unsigned int uInt
Definition: aipstype.h:51
casacore::Vector< casacore::Double > interpVisFreq_p
Definition: FTMachine.h:509
casacore::Bool canComputeResiduals_p
Definition: FTMachine.h:524
virtual void initMaps(const VisBuffer &vb)
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:120
virtual void setSpwFreqSelection(const casacore::Matrix< casacore::Double > &spwfreqs)
casacore::Vector< casacore::Double > lsrFreq_p
casacore::Vector of float lsrfreq needed for regridding
Definition: FTMachine.h:508
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
virtual casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
Definition: FTMachine.h:319
virtual void finalizeToSkyNew(casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)