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/aiftrr.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/vops/ak/aiftrr.x')
-rw-r--r-- | sys/vops/ak/aiftrr.x | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/vops/ak/aiftrr.x b/sys/vops/ak/aiftrr.x new file mode 100644 index 00000000..96789581 --- /dev/null +++ b/sys/vops/ak/aiftrr.x @@ -0,0 +1,36 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AIFTRR -- Inverse fourier transform (real transform, real output arrays). +# The inverse transform of the real arrays FR and FI of length NPIX/2+1 is +# returned in the real array SR of length NPIX. Since the real inverse +# transform is being performed the array SI is ignored and may be omitted. +# The transformation may be performed in place if desired. NPIX must be a +# power of 2. + +procedure aiftrr (fr, fi, sr, si, npix) + +real fr[ARB], fi[ARB] # real and imag parts of transform (input) +real sr[ARB], si[ARB] # spatial data (output). SI NOT USED. +int npix +int ier +pointer sp, work + +begin + call smark (sp) + call salloc (work, npix + 2, TY_REAL) + + # Pack the real and imaginary parts into a complex array as required + # by FFS. + call apkxr (fr, fi, Memr[work], npix / 2 + 1) + + # Compute the inverse transform. + call ffs (Memr[work], npix, ier) + if (ier == 1) + call fatal (1, "aiftrr: npix not a power of 2") + + # The work array now contains the real part of the transform; merely + # copy it to the output array. + call amovr (Memr[work], sr, npix) + + call sfree (sp) +end |