fftshift1D_real Subroutine

private subroutine fftshift1D_real(array)

similar to numpy.fft.fftshift in Python shift data such that the element for kx=0 or ky=0 is in the center of the array

Arguments

Type IntentOptional Attributes Name
real, intent(inout), dimension(:) :: array

Contents

Source Code


Source Code

  subroutine fftshift1D_real(array)
    real, dimension(:), intent(inout) :: array
    integer :: shift_no
    shift_no = -(size(array) - 1) / 2
    array = cshift(array, shift = shift_no, dim = 1)
  end subroutine fftshift1D_real