!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Define SIC Variables to be used by procedures documented by INPUT
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! If this file has already been read then return.
if exist(cube%defined) then
   return
else
   @ a-old-delete-greg.cube
endif
define logical cube%defined /global
let cube%defined no
!
! Common display tools
!
if (sic%program.ne."mapping") then
   define character names*512[5] name*512 /global
   define character types*12[5] type*12 /global
   define character mark*12 /global
   define integer nimages nreference pens[2,5] /global
   define integer first last step /global
   define integer xpix[3] ypix[3] /global
   define double center[2] size[2] cross /global
   define double area_spacing width_spacing velo_spacing /global
   define double spacing spacings[5] /global
   define double scale[2] scales[2,5] /global
   define double range[2] vsys /global
   define double sampling[2] /global
   define double angle /global
endif
!
define double ucenter[2] usize[2] /global
define double xcenter[2] xsize[2] /global
define double ascale[2] pscale[2] /global
!
! Structures
!
if exist(do) then
   delete /var do
endif
if .not.exist(do) then
   define structure do /global
   define logical do%old /global
   define logical do%cross do%box /global
   define logical do%bit do%contour do%fill do%grey do%nice do%loop do%vsys /global
   define logical do%header do%wedge do%mask do%dirty do%coverage do%weight /global
   define character do%pv*2 /global
   define integer do%nxybox[2] /global
   define integer do%color[3] /global
   define character do%marker*16 do%space*12 do%coord*3 do%scoord*3 do%vcoord*3 /global
   define double do%expand do%aspect /global
   !
   define integer do%nranges /global
   define double do%ranges[2,5] /global
   !
   define double do%slice[2,2] do%win[2] do%pos[2] do%chan /global
   let do%chan nan
   !
   define logical do%legend do%label /global
   define structure do%leg do%lab /global
   define double do%leg%xp do%leg%yp /global
   define character do%leg%pos*12 do%leg%xt*64 do%leg%yt*64 /global
   define character do%lab%xp*1[2] do%lab%yp*1[2] /global
   !
   define integer do%maxbox /global
   !
   define integer do%nbin /global
   !
   define logical do%starthelp /global
   !
   define character do%filename*512 /global
endif
!
if .not.exist(true) then
   define structure true /global
   define integer true%first[2] true%last[2] true%step[2] /global
   define double  true%center[2] true%size[2] true%scale[2] true%spacing /global
   define character true%scaling*8 /global
   !
   define integer true%blc[4] true%trc[4] true%dim[4] true%ndim /global
   !
   define double true%ucenter[2] true%usize[2] /global
   define structure true%urange /global
   define integer true%urange%p[2,2] /global ! Pixel
   define double  true%urange%m[2,2] /global ! Meter
   !
   define structure true%prange /global
   define integer true%prange%p[2,2] /global ! Pixel
   define double  true%prange%r[2,2] /global ! Radian
   define double  true%prange%s[2,2] /global ! Second
   !
   define structure true%sampling /global
   define integer true%sampling%p[2] /global ! Pixel
   define double  true%sampling%r[2] /global ! Radian
   define double  true%sampling%s[2] /global ! Second
   !
   define structure true%pos /global
   define integer true%pos%p[2] /global ! Pixel
   define double  true%pos%r[2] /global ! Radian
   define double  true%pos%s[2] /global ! Second
   !
   define structure true%slice /global
   define integer true%slice%p[2,2] /global ! Pixel
   define double  true%slice%r[2,2] /global ! Radian
   define double  true%slice%s[2,2] /global ! Second
   define double  true%slice%u[2,2] /global ! ...
   !
   define structure true%win /global
   define integer true%win%p[2] /global ! Pixel
   define double  true%win%v[2] /global ! Velocity  unit
   define double  true%win%f[2] /global ! Frequency unit
   !
   define structure true%vranges /global
   define integer true%vranges%n /global
   define double true%vranges%v[2,5] /global
   !
   define structure true%vrange /global
   define integer true%vrange%p[2] /global ! Pixel
   define double  true%vrange%v[2] /global ! Velocity  unit
   define double  true%vrange%f[2] /global ! Frequency unit
   !
   define structure true%chan /global
   define integer true%chan%p /global ! Pixel
   define double  true%chan%v /global ! Velocity  unit
   define double  true%chan%f /global ! Frequency unit
   !
   define structure true%level /global
   define double true%level%min true%level%max /global
   define logical true%younger /global
   define character true%name*64 true%type*12 true%mark*12 /global
   define integer true%nxybox[2] /global
   define integer true%color[3] /global
   define character true%marker*16 true%space*12 /global
   define character true%coord*3 true%scoord*3[2] true%vcoord*3 /global
   define double true%expand /global
   !
   define structure true%leg true%lab /global
   define double true%leg%xp true%leg%yp /global
   define character true%leg%xt*64 true%leg%yt*64 true%leg%pos*12 /global
   define character true%lab%xu*3  true%lab%yu*3  true%lab%xp*1[2] true%lab%yp*1[2] /global
   !
   define integer true%nbox /global
   !
   define character true%command*16 true%directory*24 /global
   !
   define real true%noise /global
   !
endif
!
! Defaults values
!
@ a-old-default.cube
!
! Definition of second to radian conversion
!
if .not.exist(sec) then
   define double sec /global
endif
let sec pi/180.0/3600.0 ! One arcsec in radians
!
! Default pencils
!
greg1\pencil 15 /colour 3 /dash 3
greg1\pencil 0
!
! Set Major symbols
!
sic\define command input "@ a-old-input.cube" cube_pro:a-old-input.hlp
sic\define command go    "@ a-old-go.cube"    cube_pro:a-old-cube.hlp
sic\define command uvt_convert "@ uvdat2uvfil.cube" cube_pro:uvdat2uvfil.hlp
sic\sic user ! Define symbol SYS_INFO
!
! Success
!
let cube%defined yes
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
