!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
begin data gag_scratch:fourier.init
  TASK\FILE "Input lmv cube" NAME_IN$ 'name'"."'type'
  TASK\FILE "Output Fourier transform cube" NAME_OUT$ 'name'"-fft."'type'
  TASK\INTEGER "Direct (+1) or inverse (-1) transform" SIGN$ +1
  TASK\LOGICAL "Do you want to reorder the Fourier transform?" REORDER$ YES
  TASK\GO
end data gag_scratch:fourier.init
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Compute Fourier transform
run fourier gag_scratch:fourier.init /nowin
!
! Update name variable
let name 'name'"-fft"
message i fft "Variable name set to "'name'
!
! Compute modulus
define image fft 'name'"."'type' read
define image mod 'name'"-mod."'type' real /like fft[1,,,]
let mod% fft%
let mod%unit1 'fft%unit2'" freq"
let mod%unit2 'fft%unit3'" freq"
let mod%unit3 'fft%unit4'
let mod%unit4 "UNKNOWN"
let mod%convert[,1:3] fft%convert[2:4]
let mod%convert[4] 0
let mod%convert[3,1:2] 299792458e-6/(mod%restfre*mod%convert[3,1:2]*mod%dim[1:2])
let mod sqrt(fft[1,,,]^2+fft[2,,,]^2)
delete /var fft mod
let name 'name'"-mod"
message i fft "Variable name set to "'name'
header 'name'"."'type' /extrema
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
