FFT_FFTPACK Module


           TIME <==> FREQUENCY DOMAIN FFT:

+-------------------------------------------------------------------+ PURPOSE : Evaluate the FFT of a function from time to frequency. +-------------------------------------------------------------------+


         FAST FOURIER TRANSFORM FUNCTIONS:

                   FORWARD TRANSFORM

+-------------------------------------------------------------------+ PURPOSE : Evaluate forward 1-DIM FFT using FFTPACK 5.1 routines. out is : [y(0), y(1), ..., y(N/2), y(-N/2+1), ..., y(-1)] if N is even [y(0), y(1), ..., y((N-1)/2), y(-(N-1)/2), ..., y(-1)] if N is odd where: y(j) = sum[k=0..N-1] x[k] * exp(-xijk 2pi/N), j = 0..N-1 For index JINC+1 where J=0,...,N-1 (that is, for the Jth element of the sequence): N-1 C(JINC+1) = SUM C(KINC+1)EXP(-XIJK2PI/N) K=0 +-------------------------------------------------------------------+


                   BACKWARD TRANSFORM

+-------------------------------------------------------------------+ PURPOSE : Evaluate 1-DIM backward FFT using FFTPACK 5.1 routines. The returned real/complex array contains y(0), y(1),..., y(n-1) where y(j) = sum_{k=-N/2,...,N/2-1}(x(k) * exp(2piXIjk/N)) For index JINC+1 where J=0,...,N-1, N-1 C(JINC+1) = SUM C(KINC+1)EXP(XIJK2PI/N) K=0 +-------------------------------------------------------------------+


                       HELPER FUNCTIONS:

+-------------------------------------------------------------------+ PURPOSE : Shift the zero-frequency to the center of the 1-DIM array output of the forward-FFT is: [y(0), y(1), ..., y(N/2), y(-N/2+1), ..., y(-1)] if N is even [y(0), y(1), ..., y((N-1)/2), y(-(N-1)/2), ..., y(-1)] if N is odd using *shift produces: [y(-N/2+1), ..., y(-1), y(0), y(1), ..., y(N/2)] if N is even [y(-(N-1)/2), ..., y(-1), y(0), y(1), ..., y((N-1)/2)] if N is even +-------------------------------------------------------------------+


Interfaces

public interface tfft

  • public subroutine d_tfft(func_in, func_out)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: func_in
    real(kind=8), optional, dimension(size(func_in)) :: func_out
  • public subroutine c_tfft(func_in, func_out)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: func_in
    complex(kind=8), optional, dimension(size(func_in)) :: func_out

public interface itfft

  • public subroutine d_itfft(func_in, func_out)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: func_in
    real(kind=8), optional, dimension(size(func_in)) :: func_out
  • public subroutine c_itfft(func_in, func_out)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: func_in
    complex(kind=8), optional, dimension(size(func_in)) :: func_out

public interface fft

  • public subroutine rfft_1d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
  • public subroutine cfft_1d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: func

public interface ifft

  • public subroutine rfft_1d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
  • public subroutine cfft_1d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: func

public interface fft2

  • public subroutine rfft_2d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:) :: func
  • public subroutine cfft_2d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:) :: func

public interface ifft2

  • public subroutine rfft_2d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:) :: func
  • public subroutine cfft_2d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:) :: func

public interface fftn

  • public subroutine rfft_nd_forward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot
  • public subroutine cfft_nd_forward(func, n, lot)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: n
    integer, intent(in) :: lot

public interface ifftn

  • public subroutine rfft_nd_backward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot
  • public subroutine cfft_nd_backward(func, n, lot)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: n
    integer, intent(in) :: lot

public interface cosft

  • public subroutine cost_1d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func

public interface icosft

  • public subroutine cost_1d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func

public interface cosftn

  • public subroutine cost_nd_forward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot

public interface icosftn

  • public subroutine cost_nd_backward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot

public interface sinft

  • public subroutine sint_1d_forward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func

public interface isinft

  • public subroutine sint_1d_backward(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func

public interface sinftn

  • public subroutine sint_nd_forward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot

public interface isinftn

  • public subroutine sint_nd_backward(func, N, lot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: func
    integer, intent(in) :: N
    integer, intent(in) :: lot

public interface fftshift

  • public function rfft_1d_shift(fin) result(fout)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: fin

    Return Value real(kind=8), dimension(size(fin))

  • public function cfft_1d_shift(fin) result(fout)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: fin

    Return Value complex(kind=8), dimension(size(fin))

public interface ifftshift

  • public function rfft_1d_ishift(fin) result(fout)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: fin

    Return Value real(kind=8), dimension(size(fin))

  • public function cfft_1d_ishift(fin) result(fout)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: fin

    Return Value complex(kind=8), dimension(size(fin))

public interface fftex

  • public subroutine rfft_1d_ex(func)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: func
  • public subroutine cfft_1d_ex(func)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: func

Functions

public function rfft_1d_shift(fin) result(fout)

Arguments

Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: fin

Return Value real(kind=8), dimension(size(fin))

public function cfft_1d_shift(fin) result(fout)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(:) :: fin

Return Value complex(kind=8), dimension(size(fin))

public function rfft_1d_ishift(fin) result(fout)

Arguments

Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: fin

Return Value real(kind=8), dimension(size(fin))

public function cfft_1d_ishift(fin) result(fout)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(:) :: fin

Return Value complex(kind=8), dimension(size(fin))


Subroutines

public subroutine d_tfft(func_in, func_out)

Arguments

Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: func_in
real(kind=8), optional, dimension(size(func_in)) :: func_out

public subroutine c_tfft(func_in, func_out)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(:) :: func_in
complex(kind=8), optional, dimension(size(func_in)) :: func_out

public subroutine d_itfft(func_in, func_out)

Arguments

Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: func_in
real(kind=8), optional, dimension(size(func_in)) :: func_out

public subroutine c_itfft(func_in, func_out)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(:) :: func_in
complex(kind=8), optional, dimension(size(func_in)) :: func_out

public subroutine rfft_1d_forward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine cfft_1d_forward(func)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:) :: func

public subroutine rfft_2d_forward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:,:) :: func

public subroutine cfft_2d_forward(func)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:,:) :: func

public subroutine rfft_nd_forward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine cfft_nd_forward(func, n, lot)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: n
integer, intent(in) :: lot

public subroutine cost_1d_forward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine sint_1d_forward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine cost_nd_forward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine sint_nd_forward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine rfft_1d_backward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine cfft_1d_backward(func)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:) :: func

public subroutine rfft_2d_backward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:,:) :: func

public subroutine cfft_2d_backward(func)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:,:) :: func

public subroutine rfft_nd_backward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine cfft_nd_backward(func, n, lot)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: n
integer, intent(in) :: lot

public subroutine cost_1d_backward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine sint_1d_backward(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func

public subroutine cost_nd_backward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine sint_nd_backward(func, N, lot)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout), dimension(:) :: func
integer, intent(in) :: N
integer, intent(in) :: lot

public subroutine rfft_1d_ex(func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: func

public subroutine cfft_1d_ex(func)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), dimension(:) :: func