casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ComponentFTMachine.h
Go to the documentation of this file.
1 //# ComponentFTMachine.h: Definition for ComponentFTMachine
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001
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_COMPONENTFTMACHINE_H
30 #define SYNTHESIS_COMPONENTFTMACHINE_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>
41 
42 namespace casa { //# NAMESPACE CASA - BEGIN
43 
44 
45 
46 // <summary>
47 // ComponentFTMachine: a abstract base class defining the interface
48 // for a Fourier Transform Machine to be used in the
49 // <linkto class=SkyEquation>SkyEquation</linkto> for the
50 // transformation of SkyComponents
51 // </summary>
52 
53 // <use visibility=export>
54 
55 // <reviewed reviewer="" date="" tests="" demos="">
56 
57 // <prerequisite>
58 // <li> <linkto class=SkyModel>SkyModel</linkto> module
59 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
60 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
61 // <li> <linkto class=SkyComponent>SkyComponent</linkto> class
62 // </prerequisite>
63 //
64 // <etymology>
65 // FTMachine is a Machine for Fourier Transforms
66 // </etymology>
67 //
68 // <synopsis>
69 // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be able
70 // to perform Fourier transforms on visibility data. FTMachine
71 // allows efficient Fourier Transform processing using a
72 // <linkto class=VisBuffer>VisBuffer</linkto> which encapsulates
73 // a chunk of visibility (typically all baselines for one time)
74 // together with all the information needed for processing
75 // (e.g. UVW coordinates).
76 // </synopsis>
77 //
78 // <example>
79 // A simple example of an ComponentFTMachine is found in
80 // <linkto class=GridFT>SimpleComponentFTMachine</linkto>.
81 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
82 // </example>
83 //
84 // <motivation>
85 // Define an interface to allow efficient processing of chunks of
86 // visibility data
87 //
88 // </motivation>
89 //
90 // <todo asof="98/01/25">
91 // </li> SmearedComponentFTMachine to take into account
92 // time and bandwidth smearing
93 // </todo>
94 
95 
96 
97 // Forward declarations
98 class ComponentList;
99 class VisBuffer;
100 
101 
103 public:
104 
106 
108 
110 
111  virtual ~ComponentFTMachine();
112 
113  // Get actual coherence : this is the only virtual method
114  virtual void get(VisBuffer& vb, SkyComponent& component, casacore::Int row=-1) = 0;
115  // Get actual coherence : this is the other only virtual method
116  virtual void get(VisBuffer& vb, const ComponentList& componentList, casacore::Int row=-1) = 0;
117 
118  // Rotate the uvw from the observed phase center to the
119  // desired phase center.
121  const VisBuffer& vb, const casacore::MDirection& mDesired);
122  // A version that use pointers to contigous matrix and vector
123  void rotateUVW(casacore::Double*& uvw, casacore::Double*& dphase, const casacore::Int nrows,
124  const VisBuffer& vb, const casacore::MDirection& mDesired);
125  // Set number of threads to use when predicting. Setting it to -1
126  // basically tell openmp to use the number it can get
127  void setnumthreads(const casacore::Int numthreads);
128  //set and get Time to calculate phasecenter -1.0 means using the time available at
129  //each iteration..this is used when the phasecenter in the field table is either
130  //a polynomial or has a ephemerides tables associated with it
131  //Using double in the units and epoch-frame of the ms(s) ..caller is responsible for conversion
134 protected:
135 
137 
139 
140  // Default Position used for phase rotations
142 
143  virtual void ok();
146 
147 };
148 
149 } //# NAMESPACE CASA - END
150 
151 #endif
casacore::Double phaseCenterTime_p
A Measure: astronomical direction.
Definition: MDirection.h:174
casacore::LogIO & logIO()
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb, const casacore::MDirection &mDesired)
Rotate the uvw from the observed phase center to the desired phase center.
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
ostream-like interface to creating log messages.
Definition: LogIO.h:167
ComponentFTMachine & operator=(const ComponentFTMachine &other)
void setnumthreads(const casacore::Int numthreads)
Set number of threads to use when predicting.
casacore::Double getPhaseCenterTime()
double Double
Definition: aipstype.h:55
void setPhaseCenterTime(const casacore::Double time)
set and get Time to calculate phasecenter -1.0 means using the time available at each iteration...
casacore::MPosition mLocation_p
Default Position used for phase rotations.
A class for manipulating groups of components.
A component of a model of the sky.
Definition: SkyComponent.h:130
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153