pro help_roll, hc=hc, eps=eps, file=file
;+
;NAME:
;	help_roll
;PURPOSE:
;	To display the SXT roll convention
;OPTIONAL KEYWORD INPUT:
;	hc	- If set, make a hardcopy of the plot
;RESTRICTIONS:
;	It must be run to either X window or PS device
;HISTORY:
;	Written 17-Sep-93 by M.Morrison
;	 9-Dec-93 (MDM) - Added /EPS and FILE options
;			- Changed the figures around
;-
;
xsiz = 6.25
ysiz = 3.5
f = 0.95
if (keyword_set(hc) or (!d.name eq 'PS')) then begin
    set_plot, 'ps
    device, xsize=xsiz , ysize=ysiz , /inches
    if (keyword_set(eps)) then device, /encapsulated
    f = 0.75
end else begin
    win_xsiz=xsiz*100
    win_ysiz=ysiz*100
    qmake_window = 0
    if (!d.window eq -1) then qmake_window = 1
    if ((!d.x_size ne win_xsiz) or (!d.y_size ne win_ysiz)) then qmake_window=1
    if (qmake_window) then wdef, win, win_xsiz, win_ysiz, /ur else wshow
end
;
if (keyword_set(file)) then begin & device, /close & device, file=file(0) & end
;
!p.region = [0,0,1,1]
!p.position = [0,0,1,1]
;
yrange = [0, 80]
xrange = [-0.5,0.5]*yrange(1)*xsiz/ysiz
plot, fltarr(2), fltarr(2), yrange=yrange, xrange=xrange, /nodata, xstyle=1+4, ystyle=1+4
;
xcir = cos(findgen(200)/199*2*!pi) * 15
ycir = sin(findgen(200)/199*2*!pi) * 15
cc = [21,21]
xbox = [-21,21,21,-21,-21]
ybox = [-21,-21,21,21,-21]
;
ang1 = -6 *!pi/180
ang2  = -20 *!pi/180
;
erase
x0 = -10
y0 = 35
yy0 = y0 + 4
oplot, x0+xcir, yy0+ycir
oplot, x0+[-15,15]*cos(ang1), yy0+[-15,15]*sin(ang1), linestyle=1
oplot, x0+[-15,15]*sin(ang1), yy0+[15,-15]*cos(ang1), linestyle=1
arrow, x0, yy0, x0-15*sin(ang1)*1.4, yy0+15*cos(ang1)*1.4, /data, thick=2			;go 40% beyond edge
xyouts, x0-15*sin(ang1)*1.45, yy0+15*cos(ang1)*1.6, 'Solar-North', siz=1.5*f
;
oplot, x0+xbox, y0+ybox
arrow, x0, yy0, x0, yy0+21*1.2, /data, thick=2
xyouts, x0, yy0+21*1.25, 'CCD-North', align=1, siz=1.5*f
;
arrow, x0-21, y0-21-1, x0+21+4, y0-21-1, /data		;serial register
;
xyouts, x0+25, y0+10, size=1.3*f, 'When the S/C has no roll'
xyouts, x0+25, y0+07, size=1.3*f, 'This is the orientation'
xyouts, x0+25, y0+04, size=1.3*f, 'of the sun'
;
pause
;
;---------------------- Second figure showing roll
;
if (keyword_set(file)) then begin & device, /close & device, file=file(1) & end
;
ang2 = -6 *!pi/180
ang1 = -20 *!pi/180
plot, fltarr(2), fltarr(2), yrange=yrange, xrange=xrange, /nodata, xstyle=1+4, ystyle=1+4
;
oplot, x0+xcir, yy0+ycir
oplot, x0+[-15,15]*cos(ang1), yy0+[-15,15]*sin(ang1), linestyle=1
oplot, x0+[-15,15]*sin(ang1), yy0+[15,-15]*cos(ang1), linestyle=1
arrow, x0, yy0, x0-15*sin(ang1)*1.4, yy0+15*cos(ang1)*1.4, /data, thick=2			;go 40% beyond edge
xyouts, x0-15*sin(ang1)*1.45, yy0+15*cos(ang1)*1.45, 'Solar-North', siz=1.5*f
;
oplot, x0+xbox, y0+ybox
arrow, x0, yy0, x0, yy0+21*1.2, /data, thick=2
xyouts, x0, yy0+21*1.25, 'CCD-North', align=1, siz=1.5*f
;
arrow, x0-21, y0-21-1, x0+21+4, y0-21-1, /data		;serial register
;
arrow, x0, yy0, x0-15*sin(ang2)*1.4, yy0+15*cos(ang2)*1.4, /data			;go 40% beyond edge
xyouts, x0-15*sin(ang2)*1.6, yy0+15*cos(ang2)*1.6, 'S/C-North', siz=1.5*f
;
xyouts, x0+25, y0+10, size=1.3*f, 'On 4-Sep-92 the S/C had'
xyouts, x0+25, y0+07, size=1.3*f, 'a +9 degree roll (ATT value)'
xyouts, x0+25, y0+04, size=1.3*f, '(ATT value = -ADS value)
;
pause
;
;---------------------- Third figure showing roll
;
if (keyword_set(file)) then begin & device, /close & device, file=file(2) & end
;
ang1 = -20 *!pi/180
plot, fltarr(2), fltarr(2), yrange=yrange, xrange=xrange, /nodata, xstyle=1+4, ystyle=1+4
;
x0 = -25
y0 = 45
yy0 = y0 + 4
oplot, x0+xcir, yy0+ycir
oplot, x0+[-15,15]*cos(ang1), yy0+[-15,15]*sin(ang1), linestyle=1
oplot, x0+[-15,15]*sin(ang1), yy0+[15,-15]*cos(ang1), linestyle=1
arrow, x0, yy0, x0-15*sin(ang1)*1.4, yy0+15*cos(ang1)*1.4, /data, thick=2			;go 40% beyond edge
xyouts, x0-15*sin(ang1)*1.45, yy0+15*cos(ang1)*1.45, 'Solar-North', siz=1.5*f
;
polyfill, x0-15*sin(ang1)*.8+xcir/15., yy0+15*cos(ang1)*.8+ycir/15., /data	;place dot at north pole
;
oplot, x0+xbox, y0+ybox
arrow, x0-21, y0-21-1, x0+21+4, y0-21-1, /data		;serial register
;
arrow, x0, yy0, x0, yy0+21*1.2, /data, thick=2
xyouts, x0, yy0+21*1.25, 'CCD-North', align=1, siz=1.5*f
;
;----- the plot on the right (no roll)
;
x0 = 25
ang1 = 0
oplot, x0+xcir, yy0+ycir
oplot, x0+[-15,15]*cos(ang1), yy0+[-15,15]*sin(ang1), linestyle=1
oplot, x0+[-15,15]*sin(ang1), yy0+[15,-15]*cos(ang1), linestyle=1
arrow, x0, yy0, x0-15*sin(ang1)*1.4, yy0+15*cos(ang1)*1.4, /data, thick=2			;go 40% beyond edge
xyouts, x0-15*sin(ang1)*1.45, yy0+15*cos(ang1)*1.45, 'Solar-North', siz=1.5*f
xyouts, x0-17, yy0, 'E', siz=1.5*f, align=0.5
xyouts, x0+17, yy0, 'W', siz=1.5*f, align=0.5
xyouts, x0, yy0-18, 'S', siz=1.5*f, align=0.5
;
polyfill, x0+15*sin(ang1)*.8+xcir/15., yy0+15*cos(ang1)*.8+ycir/15., /data	;place dot at north pole

xyouts, 0, y0-32, size=1.3*f, align=0.5, 'When using CONV_P2A, the S/C roll angle is removed, but
xyouts, 0, y0-35, size=1.3*f, align=0.5, 'the solar B-angle is not removed (the dot signifies the "north pole")
;

end

