SF_FFT_FFTPACK Module


           TIME <==> FREQUENCY DOMAIN FFT:

+-------------------------------------------------------------------+ PURPOSE : Evaluate the simple FT 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 +-------------------------------------------------------------------+


Uses

  • module~~sf_fft_fftpack~~UsesGraph module~sf_fft_fftpack SF_FFT_FFTPACK module~sf_arrays SF_ARRAYS module~sf_fft_fftpack->module~sf_arrays module~sf_constants SF_CONSTANTS module~sf_fft_fftpack->module~sf_constants module~sf_integrate SF_INTEGRATE module~sf_fft_fftpack->module~sf_integrate module~gauss_quadrature GAUSS_QUADRATURE module~sf_integrate->module~gauss_quadrature

Used by

  • module~~sf_fft_fftpack~~UsedByGraph module~sf_fft_fftpack SF_FFT_FFTPACK module~scifor SCIFOR module~scifor->module~sf_fft_fftpack

Interfaces

public interface FT_direct

  • private function d_FT_direct(ft, t, w) result(fw)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: ft
    real(kind=8), intent(in), dimension(size(ft)) :: t
    real(kind=8), intent(in), dimension(:) :: w

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

  • private function c_FT_direct(ft, t, w) result(fw)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(in), dimension(:) :: ft
    real(kind=8), intent(in), dimension(size(ft)) :: t
    real(kind=8), intent(in), dimension(:) :: w

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

public interface FT_inverse

  • private function d_FT_inverse(fw, t, w) result(ft)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: fw
    real(kind=8), intent(in), dimension(:) :: t
    real(kind=8), intent(in), dimension(size(fw)) :: w

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

  • private function c_FT_inverse(fw, t, w) result(ft)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(in), dimension(:) :: fw
    real(kind=8), intent(in), dimension(:) :: t
    real(kind=8), intent(in), dimension(size(fw)) :: w

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

public interface FFT_signal

  • private function d_FFT_signal(ft, dt) result(fw)

    Arguments

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

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

  • private function c_FFT_signal(ft, dt) result(fw)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: ft
    real(kind=8) :: dt

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

public interface iFFT_signal

  • private function d_iFFT_signal(fw, dt) result(ft)

    Arguments

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

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

  • private function c_iFFT_signal(fw, dt) result(ft)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), dimension(:) :: fw
    real(kind=8) :: dt

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

public interface tfft

  • private 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
  • private 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

  • private 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
  • private 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))

public function fft_tmax(L, dt)

Arguments

Type IntentOptional Attributes Name
integer :: L
real(kind=8) :: dt

Return Value real(kind=8)

public function fft_fmax(L, dt)

Arguments

Type IntentOptional Attributes Name
integer :: L
real(kind=8) :: dt

Return Value real(kind=8)

public function fft_tarray(L, dt) result(time)

Arguments

Type IntentOptional Attributes Name
integer :: L
real(kind=8) :: dt

Return Value real(kind=8), dimension(L)

public function fft_farray(L, dt, df) result(freq)

Arguments

Type IntentOptional Attributes Name
integer :: L
real(kind=8) :: dt
real(kind=8), optional :: df

Return Value real(kind=8), dimension(L)


Subroutines

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