HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 5 Fast Fourier Transforms 549
Two-dimensional FFT S2DFFT/D2DFFT
Name S2DFFT/D2DFFT
Two-dimensional FFT
Purpose Given a set of complex data with the real and imaginary parts in separate real
arrays, these subprograms compute the two-dimensional forward or inverse
DFT. Two companion subprograms, C2DFFT and Z2DFFT, perform the same
operation but with the complex data presented in a complex array.
The two-dimensional forward DFT of z(n
1
,n
2
), for n
1
= 1, 2, ..., l
1
and
n
2
= 1, 2, ..., l
2
, is defined by
for m
1
= 1, 2, ..., l
1
, m
2
= 1, 2, ..., l
2
, and .
Alternatively, the two-dimensional inverse DFT of Z(m
1
,m
2
), for
m
1
= 1, 2, ..., l
1
and m
2
= 1, 2, ..., l
2
, is defined by
for n
1
= 1, 2, ..., l
1
and n
2
= 1, 2, ..., l
2
.
The complex data, z or Z, are stored with real and imaginary parts in separate
real arrays, x and y, respectively.
For best performance, these subprograms require that l
1
and l
2
be products of
powers of 2, 3, and 5, that is, of the form
l
k
=2
p
k
3
q
k
5
r
k
,
where p
k
, q
k
, r
k
0, k = 1, 2.
Usage VECLIB:
INTEGER*4 l1, l2, ldxy, iopt, ier
REAL*8 x(ldxy, l2), y(ldxy, l2)
CALL D2DFFT(x, y, l1, l2, ldxy, iopt, ier)
INTEGER*4 l1, l2, ldxy, iopt, ier
REAL*4 x(ldxy, l2), y(ldxy, l2)
CALL S2DFFT(x, y, l1, l2, ldxy, iopt, ier)
VECLIB8:
Z(m
1
,m
2
)
n
1
1=
l
1
n
2
1=
l
2
z(n
1
,n
2
) e
-2πi(m
1
1)(n
1
1)/l
1
e
-2πi(m
2
1)(n
2
1)/l
2
=
i 1=
z(n
1
,n
2
)
1
l
1
l
2
---------
m
1
1=
l
1
m
2
1=
l
2
Z(m
1
,m
2
) e
+2πi(m
1
1)(n
1
1)/l
1
e
+2πi(m
2
1)(n
2
1)/l
2
=