casacore
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: 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//# $Id$
27
28#ifndef SCIMATH_DFTSERVER_H
29#define SCIMATH_DFTSERVER_H
30
31
32#include <casacore/casa/aips.h>
33#include <casacore/casa/BasicMath/Math.h>
34#include <casacore/casa/Exceptions/Error.h>
35#include <casacore/casa/Arrays/Array.h>
36#include <casacore/casa/Arrays/ArrayMath.h>
37#include <casacore/casa/Arrays/ArrayIter.h>
38#include <casacore/casa/IO/ArrayIO.h>
39#include <casacore/casa/BasicSL/Constants.h>
40#include <casacore/casa/math.h>
41
42namespace casacore { //# NAMESPACE CASACORE - BEGIN
43
44template<class T> class Matrix;
45
46// <summary>
47// Error class for <linkto class=DFTServer>DFTServer</linkto> class
48// </summary>
49
50// <synopsis>
51// Error class for <linkto class=DFTServer>DFTServer</linkto> class.
52// </synopsis>
53
54class DFTError: public AipsError
55{
56public:
57 DFTError(): AipsError("DFTError") {}
58 DFTError(const Char *m) : AipsError(m) {}
59 DFTError(const String &m) : AipsError(m) {}
60
61 virtual ~DFTError() noexcept {}
62};
63
64// <summary>
65// Class containing methods for doing n-D slow Fourier transforms
66// </summary>
67
68// <synopsis>
69// The DFTServer class contains methods for doing n-dimensional
70// Slow Fourier Transforms. (In practice, the maximum dimension is 3).
71//
72// </synopsis>
73
74template<class T>
76{
77public:
78// default constructor
80
81// copy constructor
83
84// Other constructors
85// <group>
87 DFTServer(int, int, int);
89// </group>
90
91// destructor
93
94// assignment
96
97// n-d real <src> <-> </src> complex dft
99
100// n-d complex <src> <-> </src> real dft
102
103// n-d complex <src> <-> </src> complex dft
104 void cxdft(Array<T> &, Array<T> &, int);
105
106// display only the real component of the data
108
109// display both the real and the imaginary components of the data
111
112private:
113 // dimension of the both input and output data
115
116 // number of time data points
118
119 // number of frequency data points
121
122 // set to 1 (true) if a crfft is done
124
125
126// does a complex to complex DFT
127 void c2c(Matrix<T> &, Matrix<T> &, int);
128
129// turn a general array into a matrix
131
132};
133
134
135} //# NAMESPACE CASACORE - END
136
137#ifndef CASACORE_NO_AUTO_TEMPLATES
138#include <casacore/scimath/Mathematics/DFTServer.tcc>
139#endif //# CASACORE_NO_AUTO_TEMPLATES
140#endif //DFT_SERVER
DFTError(const String &m)
Definition: DFTServer.h:59
DFTError(const Char *m)
Definition: DFTServer.h:58
virtual ~DFTError() noexcept
Definition: DFTServer.h:61
Class containing methods for doing n-D slow Fourier transforms.
Definition: DFTServer.h:76
int crFlag
set to 1 (true) if a crfft is done
Definition: DFTServer.h:123
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:120
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:114
void cxdft(Array< T > &, Array< T > &, int)
n-d complex <-> complex dft
int numTime
number of time data points
Definition: DFTServer.h:117
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:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
char Char
Definition: aipstype.h:46