diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/vops/aiftrx.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/vops/aiftrx.x')
-rw-r--r-- | sys/vops/aiftrx.x | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/vops/aiftrx.x b/sys/vops/aiftrx.x new file mode 100644 index 00000000..63a9d53d --- /dev/null +++ b/sys/vops/aiftrx.x @@ -0,0 +1,31 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AIFTRX -- Inverse discreet fourier transform (real transform, complex data +# array in). The input array A of length NPIX/2+1 contains the DC term and +# the NPIX/2 (real,imag) pairs for each of the NPIX/2 harmonics of the real +# transform. Upon output array B contains the NPIX real data pixels from the +# inverse transform. The transform may be performed in place if desired. +# +# 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 FFS expects a +# REAL array containing (real,imag) pairs. The Fortran standard appears to +# guarantee that this will work. + +procedure aiftrx (a, b, npix) + +complex a[ARB] # transform, npix/2+1 elements +real b[ARB] # output data array +int npix +int ier + +begin + # The following is a no-op if A and B are the same array. + call amovx (a, b, npix / 2 + 1) + + # Compute the inverse real transform. + call ffs (b, npix, ier) + if (ier == 1) + call fatal (1, "afftrx: npix not a power of 2") +end |