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_TRANSFORM2_FTMACHINE_H
30 #define SYNTHESIS_TRANSFORM2_FTMACHINE_H
31 
36 #include <casa/Arrays/Array.h>
37 #include <casa/Arrays/Vector.h>
38 #include <casa/Arrays/Matrix.h>
39 #include <casa/Logging/LogIO.h>
40 #include <casa/Logging/LogSink.h>
43 #include <casa/Containers/Block.h>
53 #include <images/Images/SubImage.h>
58 
60 #include <iomanip>
61 namespace casacore{
62 
63  class UVWMachine;
64 }
65 
66 namespace casa{ //# namespace casa
67 
68  class VisModelData;
69  namespace vi{ class VisBuffer2;
70  class VisibilityIterator2;
71  }
72  namespace refim{ //# namespace for refactored imaging code with vi2/vb2
73  class BriggsCubeWeightor;
74  class SkyJones;
75 // <summary> defines interface for the Fourier Transform Machine </summary>
76 
77 // <use visibility=export>
78 
79 // <reviewed reviewer="" date="" tests="" demos="">
80 
81 // <prerequisite>
82 // <li> <linkto class=SkyModel>SkyModel</linkto> module
83 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
84 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
85 // </prerequisite>
86 //
87 // <etymology>
88 // FTMachine is a Machine for Fourier Transforms
89 // </etymology>
90 //
91 // <synopsis>
92 // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be able
93 // to perform Fourier transforms on visibility data. FTMachine
94 // allows efficient Fourier Transform processing using a
95 // <linkto class=VisBuffer>VisBuffer</linkto> which encapsulates
96 // a chunk of visibility (typically all baselines for one time)
97 // together with all the information needed for processing
98 // (e.g. UVW coordinates).
99 // </synopsis>
100 //
101 // <example>
102 // A simple example of a FTMachine is found in
103 // <linkto class=GridFT>GridFT</linkto>.
104 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
105 // </example>
106 //
107 // <motivation>
108 // Define an interface to allow efficient processing of chunks of
109 // visibility data
110 //
111 // Note that the image must be Complex. It must contain the
112 // casacore::Complex casacore::Stokes values (e.g. RR,RL,LR,LL). FTMachine
113 // uses the image coordinate system to determine mappings
114 // between the polarization and frequency values in the
115 // casacore::PagedImage and in the VisBuffer.
116 //
117 // </motivation>
118 //
119 // <todo asof="97/10/01">
120 // </todo>
121 
122 class FTMachine {
123 public:
124 
125  //# Enumerations
126  // Types of known Images that may be made using the makeImage method
127  enum Type {
128  OBSERVED=0, // From OBSERVED visibility data (default)
129  MODEL, // From MODEL visibility data
130  CORRECTED, // From CORRECTED visibility data
131  RESIDUAL, // From RESIDUAL (OBSERVED-MODEL) visibility data
132  PSF, // POINT SPREAD FUNCTION
133  COVERAGE, // COVERAGE (SD only)
134  N_types, // Number of types
136  };
137 
138  FTMachine();
139 
140 
142 
143  FTMachine(const FTMachine& other);
144 
145  FTMachine& operator=(const FTMachine& other);
146 
147  void setBasePrivates(const FTMachine& other){FTMachine::operator=(other);}
148 
149  virtual ~FTMachine();
150 
151 
152  //clone copy
153  //should make it pure virtual forcing every ftm to have a cloner
154  virtual FTMachine* cloneFTM();
155  // Initialize transform to Visibility plane
157 
158  virtual void initializeToVisNew(const vi::VisBuffer2& vb,
160 
161  //-------------------------------------------------------------------------------------
162  // Finalize transform to Visibility plane
163  // This is mostly a no-op, and is not-even called from CubeSkyEquation.
164  virtual void finalizeToVis() = 0;
165 
166  // Note : No vectorized form of finalizeToVis yet.....
167 
168  //-------------------------------------------------------------------------------------
169  // Initialize transform to Sky plane
170 
172  casacore::Matrix<casacore::Float>& weight, const vi::VisBuffer2& vb) = 0;
173 
174 
175  virtual void initializeToSkyNew(const casacore::Bool dopsf,
176  const vi::VisBuffer2& vb,
178 
179  //-------------------------------------------------------------------------------------
180  //This function has to be called after initMaps to initialize Briggs
181  //Cube weighting scheme
183 
184 
185  // Finalize transform to Sky plane
186  virtual void finalizeToSky() = 0;
187 
188  virtual void finalizeToSky(casacore::ImageInterface<casacore::Complex>& iimage){(void)iimage;};
189 
190 
191  virtual void finalizeToSkyNew(casacore::Bool dopsf,
192  const vi::VisBuffer2& vb,
194 
195  //-------------------------------------------------------------------------------------
196 
197  // Get actual coherence from grid
198  virtual void get(vi::VisBuffer2& vb, casacore::Int row=-1) = 0;
199 
200  // Put coherence to grid
201  virtual void put(const vi::VisBuffer2& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
203 
204  // Non const vb version - so that weights can be modified in-place
205  // Currently, used only by MultiTermFT
206  virtual void put(vi::VisBuffer2& vb, casacore::Int row=-1, casacore::Bool dopsf=false,
208  {put((const vi::VisBuffer2&)vb,row,dopsf,type);};
209 
210  //-------------------------------------------------------------------------------------
213  const casacore::Bool dopsf);
214 
217 
218  /*
219  virtual void normalizeSumWeight(casacore::ImageInterface<casacore::Float>& inOutImage,
220  casacore::ImageInterface<casacore::Float>& weightImage,
221  const casacore::Bool dopsf);
222  */
223 
225  const casacore::Matrix<casacore::Double>&,// sumOfWts,
226  casacore::Lattice<casacore::Float>&,// sensitivityImage,
227  casacore::Bool /*fftNorm*/){return;};
228 
232  casacore::Bool dopsf, casacore::Float pblimit, casacore::Int normtype);
233 
234 
235  // All FTMachines that fill weightimage, need to set this.
236  // TODO : Make this pure virtual.
237  virtual casacore::Bool useWeightImage(){return false;};
238  virtual casacore::Bool isSkyJonesSet(){return (sj_p.nelements()>0) && !( sj_p[0]).null() ;}
239  virtual casacore::Bool isSkyJonesChanged(vi::VisBuffer2& vb, casacore::Int row){if(sj_p.nelements()>0){return sj_p[0]->changed(vb,row);} else {return false;} };
240 
241  // Set SkyJones if image domain corrections /applycation are needed
242  // To reset the the FTMachine for stopping image based correction/applycation
243  // set in a casacore::Vector of size 0.
244  // The pointers have to be handled by the caller ..no delete happening here
246 
248 
249 
250  //-------------------------------------------------------------------------------------
251 
252  // Get the gridded visibilities or weight
253  template <typename T> void getGrid(casacore::Array<T>& thegrid);
254  // Get the final image
257 
259  const vi::VisBuffer2& /*vb*/) {};
260  // Get the final weights image
262 
263  // Get a flux (divide by this to get a flux density correct image)
264  // image if there is one
266 
267  // Make the entire image
268  // Make the entire image using a ROVisIter
269  virtual void makeImage(FTMachine::Type type,
273 
274  //-------------------------------------------------------------------------------------
275 
276  // Rotate the uvw from the observed phase center to the
277  // desired phase center.
279  const vi::VisBuffer2& vb);
280 
281  //rotate with facetting style rephasing..for multifield mosaic
283  const vi::VisBuffer2& vb);
284 
285  // Refocus on a finite distance
289  //helper function for openmp to call ...no private dependency
290  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);
291 
292 
293  // Save and restore the FTMachine to and from a record
295  casacore::Bool withImage=false, const casacore::String diskimagename="");
296  virtual casacore::Bool fromRecord(casacore::String& error, const casacore::RecordInterface& inRecord);
297 
298  // Has this operator changed since the last application?
299  virtual casacore::Bool changed(const vi::VisBuffer2& vb);
300  // Can this FTMachine be represented by Fourier convolutions?
301  virtual casacore::Bool isFourier() {return false;}
302 
303  //set otf spectral frame transform is on or off;
305 
306  //return whether the ftmachine is using a double precision grid
307  virtual casacore::Bool doublePrecGrid();
308 
309  // To make sure no padding is used in certain gridders
310  virtual void setNoPadding(casacore::Bool nopad){(void)nopad;};
311 
312  // Return the name of the machine
313 
314  virtual casacore::String name() const =0;// { return "None";};
315 
316  // set and get the location used for frame
317  virtual void setLocation(const casacore::MPosition& loc);
318  virtual casacore::MPosition& getLocation();
319 
320  // set a moving source aka planets or comets => adjust phase center
321  // on the fly for gridding
322  virtual void setMovingSource(const casacore::String& sourcename, const casacore::String& ephemtable="");
323  virtual void setMovingSource(const casacore::MDirection& mdir);
324 
325  //reset stuff in an FTMachine
326  virtual void reset();
327 
328  //set frequency interpolation type
329  virtual void setFreqInterpolation(const casacore::String& method);
331  //tell ftmachine which Pointing table column to use for Direction
332  //Mosaic or Single dish ft use this for example
333  virtual void setPointingDirColumn(const casacore::String& column="DIRECTION");
334 
336 
337  virtual void setSpwChanSelection(const casacore::Cube<casacore::Int>& spwchansels);
338  virtual void setSpwFreqSelection(const casacore::Matrix<casacore::Double>& spwfreqs);
339 
340  // set the order of the Taylor term for MFS this is to tell
341  // A-casacore::Projection to qualify the accumulated avgPB for each Taylor
342  // term in the CFCache.
343  virtual void setMiscInfo(const casacore::Int qualifier)=0;
344 
347  //
348  // Make the VB and VBStore interefaces for the interim re-factoring
349  // work. Finally removed the VB interface.
350  virtual void ComputeResiduals(vi::VisBuffer2&vb, casacore::Bool useCorrected) = 0;
351  virtual casacore::Float getPBLimit() {return pbLimit_p;};
352  //virtual void ComputeResiduals(VBStore& vb)=0;
353  //get and set numthreads
356 
357  virtual void setCFCache(casacore::CountedPtr<CFCache>& cfc, const casacore::Bool resetCFC=true);
359  casacore::String getCacheDir() { return cfCache_p->getCacheDir(); };
360 
361  virtual void setDryRun(casacore::Bool val) {isDryRun=val;};
362  virtual casacore::Bool dryRun() {return isDryRun;}
363  virtual casacore::Bool isUsingCFCache() {return (cfCache_p.nrefs()!=0);}
364 
366  {throw(casacore::AipsError("FTMachine::getFTM2() called directly!"));}
367 
369  void setPseudoIStokes(casacore::Bool pseudoI){isPseudoI_p=pseudoI;};
370 
371  //set and get Time to calculate phasecenter -1.0 means using the time available at
372  //each iteration..this is used when the phasecenter in the field table is either
373  //a polynomial or has a ephemerides tables associated with it
374  //Using double in the units and epoch-frame of the ms(s) ..caller is responsible for conversion
379 
385 protected:
386 
387  friend class VisModelData;
388  friend class MultiTermFT;
389  friend class MultiTermFTNew;
390  friend class BriggsCubeWeightor;
392 
394 
396 
399 
401 
402  // Direction of desired tangent plane
405 
407 
408  // moving source stuff
413  // This will hold the angular difference between movingDir and firstMovingDir with
414  // the frame conversion done properly etc..
416 
418 
420 
424  //Use douple precision grid in gridding process
426 
427  virtual void initMaps(const vi::VisBuffer2& vb);
428 
429  virtual void initPolInfo(const vi::VisBuffer2& vb);
430 
431  // Sum of weights per polarization and per chan
433 
434  // Sizes
436 
437  // Maps of channels and polarization
439 
440  // Stokes pseudo I only? single parallel flagged will be allowed.
442 
443  // Default Position used for phase rotations
445 
446  // Set if uvwrotation is necessary
447 
449  virtual void ok();
450 
451  // check if image is big enough for gridding
452 
453  virtual void gridOk (casacore::Int gridsupport);
454 
455 
456  // setup multiple spectral window for cubes
457  //casacore::Block <casacore::Vector <casacore::Int> > multiChanMap_p;
458  //casacore::Vector<casacore::Int> selectedSpw_p;
461  const VisBuffer& vb);
463  //redo all spw chan match especially if ms has changed underneath
465  //casacore::Bool matchAllSpwChans(const vi::VisBuffer2& vb);
466  //interpolate visibility data of vb to grid frequency definition
467  //flag will be set the one as described in interpolateArray1D
468  //return false if no interpolation is done...for e.g for nearest case
469 
476  //degridded data interpolated back onto visibilities
477 
481 
482  //Interpolate visibilities to be degridded upon
483 
484  virtual void getInterpolateArrays(const vi::VisBuffer2& vb,
486 
487 
488  void setSpectralFlag(const vi::VisBuffer2& vb, casacore::Cube<casacore::Bool>& modflagcube);
489  //Save/Recover some elements of state of ftmachine in/from record
491  //helper to save Measures in a record
495 
496  // Private variables needed for spectral frame conversion
498  //casacore::Vector<casacore::Bool> doConversion_p;
501  //casacore::Vector of float lsrfreq needed for regridding
513 
516 
520 
521  // casacore::Array for non-tiled gridding
522  // These are common to most FTmachines
525 
526 
528  // casacore::Vector<SkyJones *> sj_p;
530  //A holder for the complex image if nobody else is keeping it
538  virtual void findGridSector(const casacore::Int& nxp, const casacore::Int& nyp, const casacore::Int& ixsub, const casacore::Int& iysub, const casacore::Int& minx, const casacore::Int& miny, const casacore::Int& icounter, casacore::Int& x0, casacore::Int& y0, casacore::Int& nxsub, casacore::Int& nysub, const casacore::Bool linear);
539 
540  virtual void tweakGridSector(const casacore::Int& nx, const casacore::Int& ny,
541  const casacore::Int& ixsub, const casacore::Int& iysub);
542  void initSourceFreqConv();
548 
549  private:
550  //Some temporary wasteful function for swapping axes because we don't
551  //Interpolation along the second axis...will need to implement
552  //interpolation on y axis of a cube.
553 
558 
559 };
560 
561 #include <synthesis/TransformMachines/FTMachine.tcc>
562 
563  }//# end namespace refim
564 } // end namespace casa
565 #endif
566 
567 
568 
virtual void finalizeToSky()=0
Finalize transform to Sky plane.
virtual void initBriggsWeightor(vi::VisibilityIterator2 &vi)
This function has to be called after initMaps to initialize Briggs Cube weighting scheme ...
A Measure: astronomical direction.
Definition: MDirection.h:174
virtual void findGridSector(const casacore::Int &nxp, const casacore::Int &nyp, const casacore::Int &ixsub, const casacore::Int &iysub, const casacore::Int &minx, const casacore::Int &miny, const casacore::Int &icounter, casacore::Int &x0, casacore::Int &y0, casacore::Int &nxsub, casacore::Int &nysub, const casacore::Bool linear)
virtual casacore::Bool interpolateFrequencyTogrid(const vi::VisBuffer2 &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)
casacore::Bool matchAllSpwChans(const vi::VisBuffer2&amp; vb); interpolate visibility data of vb to grid ...
casacore::Int ny
Definition: FTMachine.h:435
void girarUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const vi::VisBuffer2 &vb)
rotate with facetting style rephasing..for multifield mosaic
A 1-D Specialization of the Array class.
casacore::Vector< casacore::Int > nxsect_p
Definition: FTMachine.h:536
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 vi::VisBuffer2 &vb)
Refocus on a finite distance.
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
casacore::Int lastMSId_p
Definition: FTMachine.h:422
casacore::Bool recoverMovingSourceState(casacore::String &error, const casacore::RecordInterface &inRecord)
casacore::MRadialVelocity::Convert obsvelconv_p
moving source spectral frame stuff
Definition: FTMachine.h:545
void setPseudoIStokes(casacore::Bool pseudoI)
Definition: FTMachine.h:369
casacore::Vector< casacore::Int > xsect_p
Definition: FTMachine.h:536
casacore::Bool storeMovingSourceState(casacore::String &error, casacore::RecordInterface &outRecord)
Save/Recover some elements of state of ftmachine in/from record.
virtual casacore::Bool useWeightImage()
All FTMachines that fill weightimage, need to set this.
Definition: FTMachine.h:237
casacore::CountedPtr< CFStore2 > cfs2_p
Definition: FTMachine.h:512
casacore::LogIO & logIO()
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const vi::VisBuffer2 &vb)=0
Initialize transform to Visibility plane.
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)=0
Get the final image.
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:122
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > cmplxImage_p
A holder for the complex image if nobody else is keeping it.
Definition: FTMachine.h:531
casacore::uInt nAntenna_p
Definition: FTMachine.h:419
casacore::Matrix< casacore::Double > sumCFWeight
Definition: FTMachine.h:432
casacore::MeasFrame mFrame_p
Definition: FTMachine.h:400
virtual void normalizeImage(casacore::Lattice< casacore::Complex > &, const casacore::Matrix< casacore::Double > &, casacore::Lattice< casacore::Float > &, casacore::Bool)
Definition: FTMachine.h:224
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
casacore::MDirection mImage_p
Definition: FTMachine.h:406
void setBasePrivates(const FTMachine &other)
Definition: FTMachine.h:147
casacore::MDirection mTangent_p
Definition: FTMachine.h:404
virtual void finalizeToVis()=0
Finalize transform to Visibility plane This is mostly a no-op, and is not-even called from CubeSkyEq...
virtual void finalizeToSky(casacore::ImageInterface< casacore::Complex > &iimage)
Definition: FTMachine.h:188
virtual Type type()
Return the type enum.
casacore::CountedPtr< refim::BriggsCubeWeightor > briggsWeightor_p
Definition: FTMachine.h:537
virtual void put(vi::VisBuffer2 &vb, casacore::Int row=-1, casacore::Bool dopsf=false, refim::FTMachine::Type type=refim::FTMachine::OBSERVED)
Non const vb version - so that weights can be modified in-place Currently, used only by MultiTermFT...
Definition: FTMachine.h:206
virtual void setCFCache(casacore::CountedPtr< CFCache > &cfc, const casacore::Bool resetCFC=true)
casacore::Bool toVis_p
Definition: FTMachine.h:518
casacore::Bool matchAllSpwChans(const VisBuffer &vb)
redo all spw chan match especially if ms has changed underneath
casacore::Matrix< casacore::Double > expandedSpwFreqSel_p
Definition: FTMachine.h:507
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
casacore::CountedPtr< CFCache > getCFCache()
Definition: FTMachine.h:358
virtual casacore::Float getPBLimit()
Definition: FTMachine.h:351
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRecord)
casacore::Bool setFrameValidity(casacore::Bool validFrame)
set otf spectral frame transform is on or off;
virtual casacore::Bool doublePrecGrid()
return whether the ftmachine is using a double precision grid
Physical quantities within reference frame.
Definition: Measure.h:235
ostream-like interface to creating log messages.
Definition: LogIO.h:167
casacore::String ephemTableName_p
Definition: FTMachine.h:411
casacore::MeasTable::Types mtype_p
Definition: FTMachine.h:546
casacore::Bool matchChannel(const casacore::Int &spw, const VisBuffer &vb)
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const vi::VisBuffer2 &vb)=0
Note : No vectorized form of finalizeToVis yet....
casacore::String getCacheDir()
Definition: FTMachine.h:359
casacore::Int npol
Definition: FTMachine.h:435
virtual void correlationToStokes(casacore::ImageInterface< casacore::Complex > &compImage, casacore::ImageInterface< casacore::Float > &resImage, const casacore::Bool dopsf)
casacore::Bool canComputeResiduals_p
Definition: FTMachine.h:517
casacore::Float pbLimit_p
Definition: FTMachine.h:527
casacore::Double distance_p
Definition: FTMachine.h:417
casacore::CountedPtr< VisBufferUtil > vbutil_p
Definition: FTMachine.h:532
virtual void finalizeToSkyNew(casacore::Bool dopsf, const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
casacore::MVDirection movingDirShift_p
This will hold the angular difference between movingDir and firstMovingDir with the frame conversion ...
Definition: FTMachine.h:415
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
casacore::CountedPtr< PolOuterProduct > pop_p
Definition: FTMachine.h:515
casacore::MDirection movingDir_p
moving source stuff
Definition: FTMachine.h:409
void setSpectralFlag(const vi::VisBuffer2 &vb, casacore::Cube< casacore::Bool > &modflagcube)
virtual void initPolInfo(const vi::VisBuffer2 &vb)
void getGrid(casacore::Array< T > &thegrid)
Types
Types to be used in different calls.
Definition: MeasTable.h:109
casacore::InterpolateArray1D< casacore::Double, casacore::Complex >::InterpolationMethod freqInterpMethod_p
Definition: FTMachine.h:504
InterpolationMethod
Interpolation methods.
virtual void tweakGridSector(const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &ixsub, const casacore::Int &iysub)
long Long
Definition: aipstype.h:52
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.
casacore::UVWMachine * uvwMachine_p
Definition: FTMachine.h:397
virtual void getWeightImage(casacore::ImageInterface< casacore::Float > &weightImage, casacore::Matrix< casacore::Float > &weights)=0
Get the final weights image.
virtual void setNoPadding(casacore::Bool nopad)
To make sure no padding is used in certain gridders.
Definition: FTMachine.h:310
virtual void put(const vi::VisBuffer2 &vb, casacore::Int row=-1, casacore::Bool dopsf=false, refim::FTMachine::Type type=refim::FTMachine::OBSERVED)=0
Put coherence to grid.
virtual void setSpwFreqSelection(const casacore::Matrix< casacore::Double > &spwfreqs)
casacore::Matrix< casacore::Double > expandedSpwConjFreqSel_p
Definition: FTMachine.h:507
void convUVW(casacore::Double &dphase, casacore::Vector< casacore::Double > &thisrow)
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...
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
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...
casacore::Bool isPseudoI_p
Stokes pseudo I only? single parallel flagged will be allowed.
Definition: FTMachine.h:441
casacore::Int lastFieldId_p
Definition: FTMachine.h:421
casacore::Bool useDoubleGrid_p
Use douple precision grid in gridding process.
Definition: FTMachine.h:425
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &, const vi::VisBuffer2 &)
Definition: FTMachine.h:258
virtual casacore::Bool canComputeResiduals()
Definition: FTMachine.h:346
virtual void ComputeResiduals(vi::VisBuffer2 &vb, casacore::Bool useCorrected)=0
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual casacore::Bool changed(const vi::VisBuffer2 &vb)
Has this operator changed since the last application?
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...
casacore::Int getnumthreads()
casacore::Vector< casacore::Double > imageFreq_p
Definition: FTMachine.h:500
casacore::Double phaseCenterTime_p
Definition: FTMachine.h:533
casacore::SpectralCoordinate spectralCoord_p
Private variables needed for spectral frame conversion.
Definition: FTMachine.h:497
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
double Double
Definition: aipstype.h:55
virtual casacore::Bool isUsingCFCache()
Definition: FTMachine.h:363
void setnumthreads(casacore::Int n)
virtual void ComputeResiduals(VBStore&amp; vb)=0; get and set numthreads
casacore::Array< casacore::Complex > griddedData
casacore::Array for non-tiled gridding These are common to most FTmachines
Definition: FTMachine.h:523
casacore::Bool freqFrameValid_p
casacore::Vector&lt;casacore::Bool&gt; doConversion_p;
Definition: FTMachine.h:499
virtual void initializeToSkyNew(const casacore::Bool dopsf, const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
Object to provide MODEL_DATA visibilities on demand.
Definition: VisModelData.h:148
casacore::Double getPhaseCenterTime()
Definition: FTMachine.h:376
casacore::Int numthreads_p
Definition: FTMachine.h:519
casacore::Int nchan
Definition: FTMachine.h:435
Type
Types of known Images that may be made using the makeImage method.
Definition: FTMachine.h:127
virtual void setMovingSource(const casacore::String &sourcename, const casacore::String &ephemtable="")
set a moving source aka planets or comets =&gt; adjust phase center on the fly for gridding ...
virtual void getInterpolateArrays(const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag)
Interpolate visibilities to be degridded upon.
casacore::Int nvispol
Definition: FTMachine.h:435
virtual casacore::Bool isSkyJonesSet()
Definition: FTMachine.h:238
Converts UVW coordinates between coordinate systems.
Definition: UVWMachine.h:160
virtual casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
Definition: FTMachine.h:301
virtual void initMaps(const vi::VisBuffer2 &vb)
virtual void gridOk(casacore::Int gridsupport)
check if image is big enough for gridding
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool fixMovingSource_p
Definition: FTMachine.h:410
casacore::Array< casacore::DComplex > griddedData2
Definition: FTMachine.h:524
casacore::Vector< casacore::Int > cfStokes_p
Definition: FTMachine.h:508
casacore::Vector< casacore::Int > chanMap
Maps of channels and polarization.
Definition: FTMachine.h:438
casacore::Bool doUVWRotation_p
Set if uvwrotation is necessary.
Definition: FTMachine.h:448
float Float
Definition: aipstype.h:54
casacore::CountedPtr< casacore::ROMSColumns > romscol_p
Definition: FTMachine.h:423
casacore::Int polInUse_p
Definition: FTMachine.h:509
casacore::LogIO logIO_p
Definition: FTMachine.h:391
casacore::Int nvischan
Definition: FTMachine.h:435
template &lt;class T, class U&gt; class vector;
Definition: MSFlagger.h:37
casacore::Vector< casacore::Int > nVisChan_p
setup multiple spectral window for cubes casacore::Block &lt;casacore::Vector &lt;casacore::Int&gt; &gt; multiCh...
Definition: FTMachine.h:459
casacore::CountedPtr< CFCache > cfCache_p
Definition: FTMachine.h:510
virtual void setDryRun(casacore::Bool val)
Definition: FTMachine.h:361
Interconvert pixel and frequency values.
virtual void setFreqInterpolation(const casacore::String &method)
set frequency interpolation type
casacore::Bool tangentSpecified_p
Direction of desired tangent plane.
Definition: FTMachine.h:403
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const vi::VisBuffer2 &vb)
void shiftFreqToSource(casacore::Vector< casacore::Double > &freqs)
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:375
virtual void makeImage(FTMachine::Type type, vi::VisibilityIterator2 &vi, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
Make the entire image Make the entire image using a ROVisIter.
casacore::Bool changedSkyJonesLogic(const vi::VisBuffer2 &vb, casacore::Bool &firstRow, casacore::Bool &internalRow)
virtual casacore::Long estimateRAM(const casacore::CountedPtr< SIImageStore > &imstore)
utility function that returns a rough estimate of memory needed.
casacore::Bool saveMeasure(casacore::RecordInterface &rec, const casacore::String &name, casacore::String &error, const casacore::Measure &ms)
helper to save Measures in a record
casacore::String pointingDirCol_p
Definition: FTMachine.h:505
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
virtual casacore::String name() const =0
Return the name of the machine.
Base class for all Casacore library errors.
Definition: Error.h:134
casacore::Vector< casacore::CountedPtr< SkyJones > > sj_p
casacore::Vector&lt;SkyJones *&gt; sj_p;
Definition: FTMachine.h:529
casacore::Int nx
Sizes.
Definition: FTMachine.h:435
casacore::Int doneThreadPartition_p
Some parameters and helpers for multithreaded gridders.
Definition: FTMachine.h:535
virtual void stokesToCorrelation(casacore::ImageInterface< casacore::Float > &modelImage, casacore::ImageInterface< casacore::Complex > &compImage)
casacore::Vector< casacore::Double > interpVisFreq_p
Definition: FTMachine.h:503
casacore::Vector< casacore::Int > channelMap(const vi::VisBuffer2 &vb)
void setBriggsCubeWeight(casacore::CountedPtr< refim::BriggsCubeWeightor > bwght)
Functions associated with Briggs weighting for cubes.
Definition: FTMachine.h:381
virtual casacore::Bool isSkyJonesChanged(vi::VisBuffer2 &vb, casacore::Int row)
Definition: FTMachine.h:239
virtual void reset()
reset stuff in an FTMachine
casacore::Vector< casacore::Int > polMap
Definition: FTMachine.h:438
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual void initializeToVisNew(const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
Vector of three direction cosines.
Definition: MVDirection.h:106
virtual void setCanComputeResiduals(casacore::Bool &b)
Definition: FTMachine.h:345
casacore::Matrix< casacore::Double > getSumWeights()
Definition: FTMachine.h:378
virtual FTMachine * cloneFTM()
clone copy should make it pure virtual forcing every ftm to have a cloner
casacore::MPosition mLocation_p
Default Position used for phase rotations.
Definition: FTMachine.h:444
casacore::Bool isDryRun
Definition: FTMachine.h:368
casacore::CountedPtr< casacore::UVWMachine > phaseShifter_p
Definition: FTMachine.h:398
Abstract base class for Record classes.
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:265
casacore::CountedPtr< ConvolutionFunction > convFuncCtor_p
Definition: FTMachine.h:514
virtual casacore::Bool dryRun()
Definition: FTMachine.h:362
FTMachine & operator=(const FTMachine &other)
casacore::Cube< casacore::Int > spwChanSelFlag_p
Definition: FTMachine.h:506
virtual void setSpwChanSelection(const casacore::Cube< casacore::Int > &spwchansels)
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:395
virtual void setLocation(const casacore::MPosition &loc)
set and get the location used for frame
virtual const casacore::CountedPtr< refim::FTMachine > & getFTM2(const casacore::Bool)
Definition: FTMachine.h:365
void getImagingWeight(casacore::Matrix< casacore::Float > &imwght, const vi::VisBuffer2 &vb)
casacore::Vector< casacore::Int > ysect_p
Definition: FTMachine.h:536
virtual casacore::MPosition & getLocation()
virtual const casacore::CountedPtr< refim::ConvolutionFunction > & getAWConvFunc()
Definition: FTMachine.h:256
casacore::MDirection firstMovingDir_p
Definition: FTMachine.h:412
casacore::Matrix< casacore::Double > spwFreqSel_p
Definition: FTMachine.h:507
casacore::Vector< casacore::Double > lsrFreq_p
casacore::Vector of float lsrfreq needed for regridding
Definition: FTMachine.h:502
unsigned int uInt
Definition: aipstype.h:51
virtual casacore::Bool interpolateFrequencyFromgrid(vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &data, FTMachine::Type type=FTMachine::MODEL)
degridded data interpolated back onto visibilities
casacore::Vector< casacore::Int > nysect_p
Definition: FTMachine.h:536
virtual casacore::String getPointingDirColumnInUse()
casacore::CountedPtr< CFStore2 > cfwts2_p
Definition: FTMachine.h:512
casacore::Matrix< casacore::Double > negateUV(const vi::VisBuffer2 &vb)
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
Definition: FTMachine.h:432
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
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...