CXML

sfft, dfft, cfft, zfft 


FORMAT

  Real transform: status = {S,D}FFT

  (input_format, output_format, direction, in, out, n, stride)

  Complex transform in complex data format: status = {C,Z}FFT

  (input_format, output_format, direction, in, out, n, stride)

  Complex transform in real data format: status = {C,Z}FFT

  (input_format, output_format, direction, in_real, in_imag, out_real,
   out_imag, n, stride)

Arguments

  input_format, output_format
                      character*(*)
                      Identifies the data type of the input and the format to
                      be used to store the data, regardless of the data type.
                      For example, a complex sequence can be stored in real
                      format.

                      The character 'R' specifies the format as real; the
                      character 'C' specifies the format as complex. As
                      convenient, use either upper- or lowercase characters,
                      and either spell out or abbreviate the word.

                      The following table shows the valid values:

  Subprogram   Input Format   Output Format   Direction

  {S,D}        'R'            'C'             'F'

               'C'            'R'             'B'

               'R'            'R'             'F' or 'B'

  {C,Z}        'R'            'R'             'F' or'B'

               'C'            'C'             'F' or 'B'

       For complex transforms, the type of data determines what other
       arguments are needed. When both the input and output data are real,
       the complex functions store the data as separate arrays for imaginary
       and real data so additional arguments are needed.

  direction           character*(*)
                      Specifies the operation as either the forward or
                      inverse transform. Use 'F' or 'f' to specify the
                      forward direction. Use 'B' of 'b' to specify the
                      inverse transform.

  in, out             real*4 | real*8 | complex*8 | complex*16
                      Both the arguments are one-dimensional arrays.  The
                      input and output arrays can be the same array. The IN
                      array contains the data to be transformed. The OUT
                      array contains the transformed data.

  in_real, out_real, in_imag, out_imag
                      real*4 | real*8
                      Use these arguments when performing a complex transform
                      on real data format and storing the result in a real
                      data format.

  n                   integer*4
                      Specifies the number of values to be transformed, that
                      is, the length of the array to be transformed, and
                      therefore the required size of the resulting array; n >
                      0

  Subprogram   Input Format   Output Format   Minimum Size

  {S,D}        'R'            'C'             n+2 (n must be even)

               'C'            'R'             n+2 (n must be even)

               'R'            'R'             n (n must be even)

  {C,Z}        'R'            'R'             n

               'C'            'C'             n

  stride              integer*4
                      Specifies the distance between consecutive elements in
                      the input and output arrays. The distance must be at
                      least 1.

Description

  The _FFT functions compute the fast Fourier transform of one-dimensional
  data in one step. The SFFT and DFFT functions perform the forward Fourier
  transform of a real sequence and store the result in either real or complex
  data format.  These functions also perform the inverse Fourier transform of
  a complex sequence into a real sequence.

  The CFFT and ZFFT functions perform Fourier transforms on a complex
  sequence.  However, the argument list is different, depending on the data
  format in which the output data is stored.  See the CXML Reference Manual's
  chapter on "Using the Signal Processing Subprograms" for an explanation of
  real and complex data format.

Return Values

  0                  DXML_SUCCESS()

  4 (real transforms only)
                     DXML_ILL_N_IS_ODD()

  8                  DXML_ILL_N_RANGE()

  12                 DXML_INS_RES()

  13                 DXML_BAD_STRIDE()

  15                 DXML_BAD_DIRECTION_STRING()

  16                 DXML_BAD_FORMAT_STRING()

  18 (real transforms only)
                     DXML_BAD_FORMAT_FOR_DIRECTION()

Example

  INCLUDE 'CXMLDEF.FOR'
  INTEGER*4 N, STATUS
  COMPLEX*16 A(1024), B(1024)
  REAL*8 C_REAL(1024),C_IMAG(1024),D_REAL(1024),D_IMAG(1024)
  REAL*8 E(1026),F(1026)
  REAL*8 G(1024),H(1024)
  N = 1024
  STATUS = ZFFT('C','C','F',A,B,N,1)
  STATUS = ZFFT('R','R','F',C_REAL,C_IMAG,D_REAL,D_IMAG,N,1)
  STATUS = DFFT('R','C','F',E,F,N,1)
  STATUS = DFFT('C','R','B',F,E,N,1)
  STATUS = DFFT('R','R','F',G,H,N,1)

  This FORTRAN code computes the following:

    Forward Fourier transform of the complex sequence A to the complex
     sequence B.

    Forward Fourier transform of the complex sequence C to the complex
     sequence D. The data C and D are each stored as two real arrays.

    Forward Fourier transform of the real sequence E to the complex sequence
     F.  The data F is stored in complex format.

    Backward Fourier transform of the  complex sequence F to the real
     sequence E.

    Backward Fourier transform of the real sequence G to the complex
     sequence H stored in real format.

CXML Home Page

Index of CXML Routines