! @ p_side_display Root ix ix Spectro Flux
!   Root is the Displayed variable name
!       ix      Current X pixel
!       iy      Current Y pixel
!   Position is a Structure containing
!       %plane     current plane
!       %velo      current velocity
!       %freq      current frequency
!
! Spectro = view%current    for View
! Spectro = amap%current    for SHOW
!
! Graphic window version
define integer ix iy
let ix &2
let iy &3
greg1\set expand 1.0
!
define character string*16
define double rx ry value
define character*24 cx cy
!
! Channel
greg1\draw text 0 -1 "Channel "'&4%plane' 6 0 /CHAR 7
! Velocity
greg1\draw text 0 -2.5 "Velocity "'0.01*nint(100*&4%velo)'" km/s"  6 0 /CHAR 7
! Write the alternate Frequency axis
if (&1%spec.ne.0) then
  let string &4%freq /format F16.3
  greg1\draw text 0 -4 "Freq. "'string'" MHz"  6 0 /CHAR 7
endif
! Pixel  (ix,iy)
greg1\draw text 0 -5.5 "Pixel ("'ix'","'iy'")" 6 0 /char 7
! Offset
if .not.exist(i_x) then
  define integer i_x i_y i_f
  let i_x 1
  let i_y 2
  let i_f 3
endif
let rx (ix-&1%convert[1,i_x])*&1%convert[3,i_x]+&1%convert[2,i_x]
let ry (iy-&1%convert[1,i_y])*&1%convert[3,i_y]+&1%convert[2,i_y]
let cx rx/box%aunit /format f0.2
let cy ry/box%aunit /format f0.2
!if (sec.eq.1) then
!  greg1\draw text 0 -7 "Offset ("'cx'","'cy'")" 6 0 /char 7
!else
  greg1\draw text 0 -7 "Offset ("'cx'","'cy'") "'box%gunit' 6 0 /char 7
!endif
! Intensity    ("'&1%unit'")"
define integer i1 i2 i3 
let i'i_x' ix
let i'i_y' iy
let i'i_f' &4%plane
if (&1%ndim.eq.4) then
  let value &1[i1,i2,i3,1]
else if (&1%ndim.eq.3) then
  let value &1[i1,i2,i3]
else
  let value &1[i1,i2]
endif
let string value /format 1pg11.3
greg1\draw text 0 -8.5 "Value "'string'" ("'&1%unit'")" 6 0 /char 7
if (&5) then
  let string value/view%jyperk /format 1pg11.3
  greg1\draw text 0 -10 "Value "'string'" (K)" 6 0 /char 7
endif
if (exist(redshift)) then
  if (redshift.ne.0) then
    greg1\draw text 0 -11.5 "Redshift "'redshift' 6 0 /char 7
  endif
endif
