!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! @ p_rot
! J.Pety 2004
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
begin data gag_scratch:rot-reproject.init
  !
  ! Parameter file for REPROJECT
  !
  task\file "Input file"  Z_NAME$ 'name'"."'type'
  task\file "Output file" X_NAME$ 'name'"-rot"'angle'"deg."'type'
  task\logical "Reproject on a third file's projection [YES|NO]" TEMPLATE$ NO
  SAY "If you answered YES,  enter the file name below:"
  task\file "This Template File Name" Y_NAME$ ""
  SAY "If not, fill the form below:"
  task\character "Projection type" PROJECTION$ "AZIMUTHAL" /CHOICE NONE GNOMONIC ORTHOGRAPHIC  AZIMUTHAL STEREOGRAPHIC LAMBERT AITOFF RADIO
  task\character "Coord.System [EQUATORIAL [epoch]|GALACTIC]" SYSTEM$ "UNCHANGED" /CHOICE EQUATORIAL GALACTIC UNCHANGED
  task\character "Coord. 1 of projection center. Could be UNCHANGED" CENTER_1$ "UNCHANGED" /CHOICE UNCHANGED *
  task\character "Coord. 2 of projection center" CENTER_2$ "UNCHANGED" /CHOICE UNCHANGED *
  task\real "Position angle of projection" ANGLE$ 'angle' /RANGE 0 360
  task\integer "Dimensions of output image [0 0 mean guess]" DIMENSIONS$[2]  0 0
  task\real "First axis conversion formula [0 0 0 mean guess]" AXIS_1$[3]  0 0 0
  task\real "Second axis conversion formula [0 0 0 mean guess]" AXIS_2$[3]  0 0 0
  task\logical "Change blanking value" CHANGE$ YES
  SAY "If you answered YES,  enter the new blanking value below:"
  task\real "New blanking value and tolerance" BLANKING$[2]  -1000 1
  task\go
  !
end data gag_scratch:rot-reproject.init
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Projection center, projection type and corred system, blanking values
! should be adapted from original image.
!
define character fullname*256
let fullname 'name'"."'type'
if file(fullname) then
   vector\run reproject gag_scratch:rot-reproject.init /nowin
   let name 'name'"-rot"'angle'"deg"
   say "Name set to "'name'
   define header rot_head 'name'"."'type' write
   let rot_head%pa 'rot_head%pa+angle*pi/180.'
   delete /var rot_head
else
   message e rot ""'fullname'" does not exist"
endif
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
