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