!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! GREG specific definitions
! Define SIC Variables to be used by procedures documented by INPUT
!
! J.Pety 2003-2008 from original ideas of S.Guilloteau and R.Lucas
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! If this file has already been read then return
if exist(greg%def) then
   return
endif
define logical greg%def /global
let greg%def no
!
! Text formatting definition: This is obsolescent. It should soon be replaced.
!
define character bold*4 norm*4 /global
sic\let bold ""
sic\let norm ""
!
! Common display tools
!
define character command*16 /global
define character names*256[5] name*256 refname*256 /global
define character types*12[5] reftype*64 /global
if .not.exist(type) then
   define character type*12 /global ! Already defined by mapping
endif
!
! Be careful: default values are tested at least in p_lmv.greg
!
let name    " "      ! Map file name (without extension)
let type    " "      ! Map file extension
let command " "      ! Command name default
!
! Old system variables
!
define character beam_type*5 extra*8 /global
define logical do_tree /global
define integer aaa__date spe__date tuv__date /global
define character aaa__name*256 aaa__type*12 /global
define character spe__name*256 spe__type*12 /global
define character tuv__name*256  /global
!
! New system variables
!
if .not.exist(angle) then
   define double angle /global
   let angle 0.0
endif
if .not.exist(mosaic) then
   define logical mosaic /global
   let mosaic no
endif
define character mark*12 file*40 box_limits*40 /global
define character marker1*20 marker2*20 space_type*12 /global
define logical do_bit do_contour do_fill do_grey do_nice do_color do_rcoord do_loop /global
define logical do_label do_legend do_header do_wedge do_mask do_dirty do_coverage do_weight do_vsys /global
define integer nimages nreference pens[2,5] /global
define integer first last step channel mbox nbox /global
define integer xpix[3] ypix[3] color[3] /global
define integer nxy_box[2] nx_box ny_box /global
define double center[2] size[2] cross aspect box_aspect expand /global
define double area_spacing width_spacing velo_spacing /global
define double true_spacing spacing spacings[5] level_min level_max /global
define double true_scale[2] scale[2] scales[2,5] ubox[1,1,1] /global
define double true_range[2] range[2] vsys /global
define integer iblc[2] itrc[2] /global
define double  rblc[2] rtrc[2] sblc[2] strc[2] /global
define double  true_sampling[2] sampling[2] /global
define integer inte_sampling[2] /global
define double plot_position[4] /global
!
define structure s /global
define double s%center[2] s%size[2] /global
define character header_name_type*256 /global  ! Pass the 'name'.'type' to the header
!
let plot_position 0.0           ! Position of plots in "go lmv".
!
let nxy_box 0                   ! Number of boxes in x and y directions
let aspect 0.0                  ! Image aspect ratio (0 means match)
let box_aspect 1.0              ! Effective box aspect ratio
let expand 0.0                  ! Character size
let first 0                     ! First channel to plot
let last 0                      ! Last channel to plot
let step 1                      !
let space_type "AUTO"           !
let spacing 0                   ! Contour spacing level in image intensity units: 0 means guess using noise properties
let true_spacing 0              ! Actual contour spacing level used
let cross 2.0                   !
let range 0
let center 0.0 0.0              ! Center of plotted map in arc sec
let size   0.0 0.0              !   Size of plotted map in arc sec
let vsys   0.0                  ! Systematic velocity in km/s
!
let sampling 0.0
!
let xpix 0
let ypix 0
!
let mark  "velocity"            ! Code for marking channel plots
let do_vsys     no              ! Right color for red and blue-shifted contours
let do_rcoord   no              ! Label with absolute coordinates
let do_weight   no              ! Do not plot the weight image
let do_dirty    no              ! Do not plot dirty beam
let do_coverage no              ! Do not plot uv coverage
let do_mask     no              ! Do not mask for plane labels
let do_label    yes             ! Do plot the coordinate labels
let do_legend   yes             ! Do plot the coordinate legends
let do_header   yes             ! Do plot the header
let do_wedge    yes             ! Do plot the wedge
let do_bit      yes             ! Do plot bitmaps
let do_grey     no              ! Do not fill contours
let do_fill     yes             ! But do fill spectra
let do_contour  yes             ! Plot contours by default
let do_nice     no              ! No "nice" plot
let do_tree     no              ! Do not structure plot
let do_color    no              ! Use special color table (GO COLOR after BIT)
let do_loop     yes             ! Enter loop in 3view
!
let color 0 360 30              ! Color table parameters: red to red, 30 brightness levels.
!
! 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
!
! Set Major symbols
!
sic\define command input "@ p_input.greg" gag_pro:input_greg.hlp
sic\define command go    "@ p_go.greg"    gag_pro:go_greg.hlp
sic\define command uvt_convert "@ uvdat2uvfil.greg" gag_pro:uvdat2uvfil.hlp
sic\sic user ! Define symbol SYS_INFO
!
! Success
!
let greg%def yes
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
