Viewing contents of file '../idllib/ghrs/pro/arc_plot_dis.pro'
pro arc_plot_dis,lname,cwave,plot_info=plot_info
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;+
;
;*NAME:	arc_plot_dis
;
;*CLASS:
;
;*CATEGORY:
;
;*PURPOSE:
;	arc_plot_dis,lname,cwave,plot_info=plot_info
;
;*CALLING SEQUENCE:
;   Procedure to plot out the dispersions for the lines contained in 
;      the line table 
;
;*PARAMETERS:
;	lname - (string) - name of line table
;	cwave - central wavelength
;
;*EXAMPLES:
;
;*RESTRICTIONS:
;	Subroutine called by ARC
;*MODIFICATION HISTORY:
;			R Robinson	- version 1
;	27-apr-1992	JKF/ACC		- moved to GHRS DAF.
;-
;-------------------------------------------------------------------------------
on_error,2
if n_params(0) lt 1 then $
	message,'plot_dis,lname,cwave'

if !d.name eq 'TEK' then begin
	scolor =1
	pcolor =8
end else begin
	scolor =!p.color
	pcolor =fix(!p.color*.75)
endelse

;
; Extract values from WAVECAL LINE table.
;
table_ext,lname,'wavelength,residual,peak,flag',w,r,p,f
list = where((r lt 100) and (f lt 1), found)
if found le 0 then $
	message,'No valid values found for RESIDUAL and FLAG'
w=w(list)
r=r(list)
p=p(list)
;
!p.multi=[0,0,2]
;
; Display grid.
;
x = fltarr(n_elements(cwave))
plot,cwave,x,yrange=[min(r),max(r)],color=scolor,linestyle=1, $
        ytitle='residual (diodes)', xtitle='Wavelength (A)', $
        title='Dispersion vs Wavelength for lines in '+lname
;
; Create scatter plot of wavelengths versus residuals (diodes)
;
oplot,w,r,color=pcolor,psym=1,linestyle=0
;
; Create scatter plot of line intensity versus residuals (diodes).
;
plot,p,r,color=scolor,psym=1,linestyle=0, $
        ytitle='residual (diodes)', xtitle='line intensity (counts)', $
        title='Dispersion vs Strength for lines in '+lname        
!p.multi=[0,0,0]

return
end