!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
begin procedure uvresample-usage
   say ""
   message e uvresample "Usage: GO UVRESAMPLE NC REF VAL INC /FREQUENCY linename freq"
   return base
end procedure uvresample-usage
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
on error "@ uvresample-usage"
!
parse 4 /frequency 2 2
!
define character linename*12
define integer nc
define double ref val inc freq
let nc &1
let ref &2
let val &3
let inc &4
let linename 'pro%parse%frequency%arg[1]'
let freq 'pro%parse%frequency%arg[2]'
!
define character filename*512
let filename 'name'".uvt"
if file(filename) then
   sic copy 'name'".uvt" 'name'"-res.uvt"
   let name 'name'"-res"
   message i uvresample "Name set to "'name'
   modify 'name'".uvt" /frequency 'linename' 'freq' /velocity 'val'
   !
   @ p_setup.map inter
   clean\uv_resample nc ref val inc
   clean\write uv 'name'
   message r uvresample ""
   message r uvresample "Velocity axis: "'nc'" "'ref'" "'val'" "'inc'" at the rest frequency of "'linename'": "'freq'
else
   message e uvresample "Unknown file: "'filename'
endif
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
