Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/dharm.doc
There are 2 other files named dharm.doc in the archive. Click here to see a list.
SUBROUTINE DHARM
PURPOSE
PERFORMS DISCRETE COMPLEX FOURIER TRANSFORMS ON A COMPLEX
DOUBLE PRECISION,THREE DIMENSIONAL ARRAY
USAGE
CALL DHARM(A,M,INV,S,IFSET,IFERR)
DESCRIPTION OF PARAMETERS
A - A DOUBLE PRECISION VECTOR
AS INPUT, A CONTAINS THE COMPLEX, 3-DIMENSIONAL
ARRAY TO BE TRANSFORMED. THE REAL PART OF
A(I1,I2,I3) IS STORED IN VECTOR FASHION IN A CELL
WITH INDEX 2*(I3*N1*N2 + I2*N1 + I1) + 1 WHERE
NI = 2**M(I), I=1,2,3 AND I1 = 0,1,...,N1-1 ETC.
THE IMAGINARY PART IS IN THE CELL IMMEDIATELY
FOLLOWING. NOTE THAT THE SUBSCRIPT I1 INCREASES
MOST RAPIDLY AND I3 INCREASES LEAST RAPIDLY.
AS OUTPUT, A CONTAINS THE COMPLEX FOURIER
TRANSFORM. THE NUMBER OF CORE LOCATIONS OF
ARRAY A IS 2*(N1*N2*N3)
M - A THREE CELL VECTOR WHICH DETERMINES THE SIZES
OF THE 3 DIMENSIONS OF THE ARRAY A. THE SIZE,
NI, OF THE I DIMENSION OF A IS 2**M(I), I = 1,2,3
INV - A VECTOR WORK AREA FOR BIT AND INDEX MANIPULATION
OF DIMENSION ONE FOURTH OF THE QUANTITY
MAX(N1,N2,N3)
LOCATIONS OF A, VIZ., (1/8)*2*N1*N2*N3
S - A DOUBLE PRECISION VECTOR WORK AREA FOR SINE TABLES
WITH DIMENSION THE SAME AS INV
IFSET - AN OPTION PARAMETER WITH THE FOLLOWING SETTINGS
0 SET UP SINE AND INV TABLES ONLY
1 SET UP SINE AND INV TABLES ONLY AND
CALCULATE FOURIER TRANSFORM
-1 SET UP SINE AND INV TABLES ONLY AND
CALCULATE INVERSE FOURIER TRANSFORM (FOR
THE MEANING OF INVERSE SEE THE EQUATIONS
UNDER METHOD BELOW)
2 CALCULATE FOURIER TRANSFORM ONLY (ASSUME
SINE AND INV TABLES EXIST)
-2 CALCULATE INVERSE FOURIER TRANSFORM ONLY
(ASSUME SINE AND INV TABLES EXIST)
IFERR - ERROR INDICATOR. WHEN IFSET IS 0,+1,-1,
IFERR = 1 MEANS THE MAXIMUM M(I) IS GREATER THAN
20, I=1,2,3 WHEN IFSET IS 2,-2 , IFERR = 1
MEANS THAT THE SINE AND INV TABLES ARE NOT LARGE
ENOUGH OR HAVE NOT BEEN COMPUTED .
IF ON RETURN IFERR = 0 THEN NONE OF THE ABOVE
CONDITIONS ARE PRESENT
REMARKS
THIS SUBROUTINE IS TO BE USED FOR COMPLEX, DOUBLE PRECISION,
3-DIMENSIONAL ARRAYS IN WHICH EACH DIMENSION IS A POWER OF
2. THE MAXIMUM M(I) MUST NOT BE LESS THAN 3 OR GREATER THAN
20, I = 1,2,3.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NONE
METHOD
FOR IFSET = +1, OR +2, THE FOURIER TRANSFORM OF COMPLEX
ARRAY A IS OBTAINED.
N1-1 N2-1 N3-1 L1 L2 L3
1,J2,J3)=SUM SUM SUM A(K1,K2,K3)*W1 *W2 *W3
K1=0 K2=0 K3=0
WHERE WI IS THE N(I) ROOT OF UNITY AND L1=K1*J1,
L2=K2*J2, L3=K3*J3
FOR IFSET = -1, OR -2, THE INVERSE FOURIER TRANSFORM A OF
COMPLEX ARRAY X IS OBTAINED.
1,K2,K3)=
1 N1-1 N2-1 N3-1 -L1 -L2 -L3
-------- *SUM SUM SUM X(J1,J2,J3)*W1 *W2 *W3
N1*N2*N3 J1=0 J2=0 J3=0
SEE J.W. COOLEY AND J.W. TUKEY, 'AN ALGORITHM FOR THE
MACHINE CALCULATION OF COMPLEX FOURIER SERIES',
MATHEMATICS OF COMPUTATIONS, VOL. 19 (APR. 1965), P. 297.