diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/vops/ak/afftrx.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/vops/ak/afftrx.x')
-rw-r--r-- | sys/vops/ak/afftrx.x | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/vops/ak/afftrx.x b/sys/vops/ak/afftrx.x new file mode 100644 index 00000000..ec43b16a --- /dev/null +++ b/sys/vops/ak/afftrx.x @@ -0,0 +1,33 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AFFTRX -- Forward fourier transform (real transform, complex output). +# The fourier transform of the real array A of length NPIX pixels is computed +# and the NPIX/2+1 complex transform coefficients are returned in the complex +# array B. The first element of array B upon output contains the dc term at +# zero frequency, and the remaining elements contain the real and imaginary +# components of the harmonics. The transformation may be performed in place +# if desired. NPIX must be a power of 2. +# +# N.B.: The Fortran 77 standard guarantees that a complex datum is represented +# as two reals, and that the first real in storage order is the real part of +# the complex datum and the second real the imaginary part. We have defined +# B to be a type COMPLEX array in the calling program, but FFA expects a +# REAL array containing (real,imag) pairs. The Fortran standard appears to +# guarantee that this will work. + +procedure afftrx (a, b, npix) + +real a[ARB] # data (input) +complex b[ARB] # transform (output). Dim npix/2+1 +int npix +int ier + +begin + # The following is a no-op if A and B are the same array. + call amovr (a, b, npix) + + # Compute the forward real transform. + call ffa (b, npix, ier) + if (ier == 1) + call fatal (1, "afftrx: npix not a power of 2") +end |