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/BasicSL/Constants.h>
38#include <casacore/casa/math.h>
39
40namespace casacore { //# NAMESPACE CASACORE - BEGIN
41
42template<class T> class Matrix;
43
44// <summary>
45// Error class for <linkto class=DFTServer>DFTServer</linkto> class
46// </summary>
47
48// <synopsis>
49// Error class for <linkto class=DFTServer>DFTServer</linkto> class.
50// </synopsis>
51
52class DFTError: public AipsError
53{
54public:
55 DFTError(): AipsError("DFTError") {}
56 DFTError(const Char *m) : AipsError(m) {}
57 DFTError(const String &m) : AipsError(m) {}
58
59 virtual ~DFTError() noexcept {}
60};
61
62// <summary>
63// Class containing methods for doing n-D slow Fourier transforms
64// </summary>
65
66// <synopsis>
67// The DFTServer class contains methods for doing n-dimensional
68// Slow Fourier Transforms. (In practice, the maximum dimension is 3).
69//
70// </synopsis>
71
72template<class T>
74{
75public:
76// default constructor
78
79// copy constructor
81
82// Other constructors
83// <group>
85 DFTServer(int, int, int);
87// </group>
88
89// destructor
91
92// assignment
94
95// n-d real <src> <-> </src> complex dft
97
98// n-d complex <src> <-> </src> real dft
100
101// n-d complex <src> <-> </src> complex dft
102 void cxdft(Array<T> &, Array<T> &, int);
103
104// display only the real component of the data
106
107// display both the real and the imaginary components of the data
109
110private:
111 // dimension of the both input and output data
113
114 // number of time data points
116
117 // number of frequency data points
119
120 // set to 1 (true) if a crfft is done
122
123
124// does a complex to complex DFT
125 void c2c(Matrix<T> &, Matrix<T> &, int);
126
127// turn a general array into a matrix
129
130};
131
132
133} //# NAMESPACE CASACORE - END
134
135#ifndef CASACORE_NO_AUTO_TEMPLATES
136#include <casacore/scimath/Mathematics/DFTServer.tcc>
137#endif //# CASACORE_NO_AUTO_TEMPLATES
138#endif //DFT_SERVER
DFTError(const String &m)
Definition DFTServer.h:57
DFTError(const Char *m)
Definition DFTServer.h:56
virtual ~DFTError() noexcept
Definition DFTServer.h:59
Class containing methods for doing n-D slow Fourier transforms.
Definition DFTServer.h:74
int crFlag
set to 1 (true) if a crfft is done
Definition DFTServer.h:121
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:118
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:112
void cxdft(Array< T > &, Array< T > &, int)
n-d complex <-> complex dft
int numTime
number of time data points
Definition DFTServer.h:115
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