pro disp_bda, index, data
;
;+
;NAME:
;	disp_bda
;PURPOSE:
;	Display the BCS spectral data in image format
;CALLING SEQUENCE:
;	disp_bda, index, data
;INPUT:
;	index
;	data
;HISTORY:
;	written 7-Mar-92 by M.Morrison
;-
;
ytopmargin = 50
ymargin = 25
xmargin = 20
ywinmax = 1000
nymax = ywinmax-ymargin - ytopmargin
ny = n_elements(index)
siz = size(data)
nx = siz(1)
if (ny gt nymax) then begin
   print, 'Cannot handle more than ', nymax, ' datasets at once because of display size constraints'
   print, 'Returning
   return
end
;
ywin1 = (ny + ymargin)
yfactor = fix((ywinmax-ytopmargin)/ywin1)
nyout = yfactor*ny
;
xwin = nx + xmargin*3
ywin = nyout+ymargin + ytopmargin
;
window, xsiz=xwin, ysiz=ywin
;
y1 = ywin - ytopmargin + 5
x1 = 0
xyouts, /device, x1, y1, 'Start: ' + fmt_tim(index(0)) + '   End: ' + fmt_tim(index(ny-1)), size=1.6
;
y1 = ymargin
y1lab = y1 - ymargin + 8
x1 = 0
tvscl, rebin(ext_bcschan(index,data,1,n), n, nyout, /sample), x1, y1		& xyouts, /device, size=1.3, x1, y1lab, 'Fe XXVI'
x1 = x1 + n + xmargin
tvscl, rebin(ext_bcschan(index,data,2,n), n, nyout, /sample), x1, y1		& xyouts, /device, size=1.3, x1, y1lab, 'Fe XXV'
x1 = x1 + n + xmargin
tvscl, rebin(ext_bcschan(index,data,3,n), n, nyout, /sample), x1, y1		& xyouts, /device, size=1.3, x1, y1lab, 'Ca XIX'
x1 = x1 + n + xmargin
tvscl, rebin(ext_bcschan(index,data,4,n), n, nyout, /sample), x1, y1		& xyouts, /device, size=1.3, x1, y1lab, 'S XV'
;
print, 'Time increases up'
print, 'Wavelength left/right'
print, 'Data has NOT been decompressed
end
