casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SetJyGridFT.h
Go to the documentation of this file.
1 //# SetJyGridFT.h: Definition for GridFT
2 //# Copyright (C) 2012
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_SETJYGRIDFT_H
30 #define SYNTHESIS_SETJYGRIDFT_H
31 
33 
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37 // <summary> An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling </summary>
38 
39 // <use visibility=export>
40 
41 // <reviewed reviewer="" date="" tests="" demos="">
42 
43 // <prerequisite>
44 // <li> <linkto class=FTMachine>GridFT</linkto> module
45 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
46 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
47 // </prerequisite>
48 //
49 // <etymology>
50 // Inheriting from GridFT which does
51 // Grid-based Fourier transforms.
52 // special case for setjy style frequency scaling
53 // </etymology>
54 //
55 // <synopsis>
56 
57 // </synopsis>
58 //
59 // <example>
60 // </example>
61 //
62 // <motivation>
63 // Define an interface to allow efficient processing of chunks of
64 // visibility data
65 // </motivation>
66 //
67 // <todo asof="2012/05/08">
68 //
69 // </todo>
70 
71 class SetJyGridFT : public GridFT {
72 public:
73 
74  // Constructor: cachesize is the size of the cache in words
75  // (e.g. a few million is a good number), tilesize is the
76  // size of the tile used in gridding (cannot be less than
77  // 12, 16 works in most cases), and convType is the type of
78  // gridding used (SF is prolate spheriodal wavefunction,
79  // and BOX is plain box-car summation). mLocation is
80  // the position to be used in some phase rotations. If
81  // mTangent is specified then the uvw rotation is done for
82  // that location iso the image center.
83  // <group>
84 
86  casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0,
87  casacore::Bool usezero=true, casacore::Bool useDoublePrec=false,
89  // </group>
90 
91  // Construct from a casacore::Record containing the GridFT state
92  SetJyGridFT(const casacore::RecordInterface& stateRec);
93 
94  // Copy constructor
95  SetJyGridFT(const SetJyGridFT &other);
96 
97  // Assignment operator
98  SetJyGridFT &operator=(const SetJyGridFT &other);
99 
100  virtual ~SetJyGridFT();
101 
102  //clone FTM
103  virtual FTMachine* cloneFTM();
104  // Initialize transform to Visibility plane using the image
105  // as a template. The image is loaded and Fourier transformed.
107  const VisBuffer& vb);
108 
109  // Finalize transform to Visibility plane: flushes the image
110  // cache and shows statistics if it is being used.
111  //void finalizeToVis();
112 
113  // Get actual coherence from grid by degridding
114  void get(VisBuffer& vb, casacore::Int row=-1);
115 
116 
117  // Save and restore the GridFT to and from a record
119  casacore::Bool withImage=false, const casacore::String diskimage="");
121 
123 
124  virtual casacore::String name() const;
125 
126 
127 protected:
128 
129 
130 
131 
132  //Prepare the grid for degridding
133  //void prepGridForDegrid();
134 
138 
139 
140 
141 };
142 
143 } //# NAMESPACE CASA - END
144 
145 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
virtual FTMachine * cloneFTM()
clone FTM
casacore::Vector< casacore::Double > freqscale_p
Prepare the grid for degridding void prepGridForDegrid();.
Definition: SetJyGridFT.h:135
virtual casacore::Bool toRecord(casacore::String &error, casacore::RecordInterface &outRec, casacore::Bool withImage=false, const casacore::String diskimage="")
Save and restore the GridFT to and from a record.
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRec)
virtual casacore::String name() const
Return the name of the machine.
casacore::Long cachesize
Sizes.
Definition: GridFT.h:252
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:409
casacore::String convType
Definition: GridFT.h:268
long Long
Definition: aipstype.h:52
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)
Initialize transform to Visibility plane using the image as a template.
virtual ~SetJyGridFT()
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
SetJyGridFT(casacore::Long cachesize, casacore::Int tilesize, casacore::String convType, casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false, const casacore::Vector< casacore::Double > &freqscale=casacore::Vector< casacore::Double >(1, 0.0), const casacore::Vector< casacore::Double > &scale=casacore::Vector< casacore::Double >(1, 1.0))
Constructor: cachesize is the size of the cache in words (e.g.
float Float
Definition: aipstype.h:54
An FTMachine for Gridded Fourier transforms.
Definition: GridFT.h:127
An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling.
Definition: SetJyGridFT.h:71
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
virtual void setScale(const casacore::Vector< casacore::Double > &freq, const casacore::Vector< casacore::Double > &scale)
casacore::Vector< casacore::Double > scale_p
Definition: SetJyGridFT.h:136
Abstract base class for Record classes.
casacore::Int tilesize
Definition: GridFT.h:253
casacore::Vector< casacore::Double > interpscale_p
Definition: SetJyGridFT.h:137
SetJyGridFT & operator=(const SetJyGridFT &other)
Assignment operator.
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:120