casacore
Loading...
Searching...
No Matches
DFTServer.h
Go to the documentation of this file.
1// # DFTServer.h: This class contains methods for doing n-D slow Fourier transforms
2// # Copyright (C) 1994,1995,1996,1999,2000,2001,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 addressed as follows:
20// # Internet email: casa-feedback@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#ifndef SCIMATH_DFTSERVER_H
27#define SCIMATH_DFTSERVER_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/casa/BasicMath/Math.h>
31#include <casacore/casa/Exceptions/Error.h>
32#include <casacore/casa/Arrays/Array.h>
33#include <casacore/casa/Arrays/ArrayMath.h>
34#include <casacore/casa/Arrays/ArrayIter.h>
35#include <casacore/casa/IO/ArrayIO.h>
36#include <casacore/casa/math.h>
37
38namespace casacore { // # NAMESPACE CASACORE - BEGIN
39
40template <class T>
41class Matrix;
42
43// <summary>
44// Error class for <linkto class=DFTServer>DFTServer</linkto> class
45// </summary>
46
47// <synopsis>
48// Error class for <linkto class=DFTServer>DFTServer</linkto> class.
49// </synopsis>
50
51class DFTError : public AipsError {
52 public:
53 DFTError() : AipsError("DFTError") {}
54 DFTError(const Char *m) : AipsError(m) {}
55 DFTError(const String &m) : AipsError(m) {}
56
57 virtual ~DFTError() noexcept {}
58};
59
60// <summary>
61// Class containing methods for doing n-D slow Fourier transforms
62// </summary>
63
64// <synopsis>
65// The DFTServer class contains methods for doing n-dimensional
66// Slow Fourier Transforms. (In practice, the maximum dimension is 3).
67//
68// </synopsis>
69
70template <class T>
71class DFTServer {
72 public:
73 // default constructor
75
76 // copy constructor
78
79 // Other constructors
80 // <group>
82 DFTServer(int, int, int);
84 // </group>
85
86 // destructor
88
89 // assignment
91
92 // n-d real <src> <-> </src> complex dft
94
95 // n-d complex <src> <-> </src> real dft
97
98 // n-d complex <src> <-> </src> complex dft
99 void cxdft(Array<T> &, Array<T> &, int);
100
101 // display only the real component of the data
103
104 // display both the real and the imaginary components of the data
106
107 private:
108 // dimension of the both input and output data
110
111 // number of time data points
113
114 // number of frequency data points
116
117 // set to 1 (true) if a crfft is done
119
120 // does a complex to complex DFT
121 void c2c(Matrix<T> &, Matrix<T> &, int);
122
123 // turn a general array into a matrix
125};
126
127} // namespace casacore
128
129#ifndef CASACORE_NO_AUTO_TEMPLATES
130#include <casacore/scimath/Mathematics/DFTServer.tcc>
131#endif // # CASACORE_NO_AUTO_TEMPLATES
132#endif // DFT_SERVER
AipsError(const Char *str, Category c=GENERAL)
Creates an AipsError and initializes the error message from the parameter.
DFTError(const String &m)
Definition DFTServer.h:55
DFTError(const Char *m)
Definition DFTServer.h:54
virtual ~DFTError() noexcept
Definition DFTServer.h:57
int crFlag
set to 1 (true) if a crfft is done
Definition DFTServer.h:118
DFTServer()
default constructor
~DFTServer()
destructor
void showComplex(Array< T > &)
display both the real and the imaginary components of the data
void crdft(Array< T > &, Array< T > &)
n-d complex <-> real dft
int numFreq
number of frequency data points
Definition DFTServer.h:115
void rcdft(Array< T > &, Array< T > &)
n-d real <-> complex dft
DFTServer(Array< T > &, Array< T > &)
Other constructors.
void c2c(Matrix< T > &, Matrix< T > &, int)
does a complex to complex DFT
void showReal(Array< T > &)
display only the real component of the data
DFTServer(int, int, int)
int dimension
dimension of the both input and output data
Definition DFTServer.h:109
void cxdft(Array< T > &, Array< T > &, int)
n-d complex <-> complex dft
int numTime
number of time data points
Definition DFTServer.h:112
DFTServer(IPosition &, IPosition &)
Matrix< T > getMatrix(Array< T > &)
turn a general array into a matrix
DFTServer< T > & operator=(const DFTServer< T > &)
assignment
DFTServer(const DFTServer< T > &)
copy constructor
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
char Char
Definition aipstype.h:44