function ratio_unc,alindex,aldata,dgindex,dgdata,te=te

;+
;NAME
;	ratio_unc
;PURPOSE
;	Compute the percent uncertainty in a ratio of images,
;	to help evaluate where to use SXT temperature deteminations.
;CALLLING SEQUENCE
;	percent_unc=ratio_unc(alindex,aldata,dgindex,dgdata,[te=te])
;INPUT
;	alindex, 	index structure for Al.1 array
;	aldata, 	Al.1 prep'd array
;	dgindex,	index structure for AlMg array.
;	dgdata,		AlMg prep'd array
;OPTIONAL KEYWORD INPUT
;	te - The log10 of electron temperature of the emitting plasma.  
;		If omitted, then Te = alog10(3.e6) is assumed.
;OUTPUT
;	Percent error in the AlMg/Al.1 ratio.
;PROGRAMS CALLED
;	lwa_dn_unc, like sxt_dn_unc but without normalization check.
;HISTORY
;	15-Nov-96 [LWA]	 Written.
;-

alunc=lwa_dn_unc(alindex,aldata,te=te,/float)
dgunc=lwa_dn_unc(dgindex,dgdata,te=te,/float)

ratio_unc=(dgunc/aldata)-((dgdata*alunc)/(aldata^2))
percent_unc=100.*(ratio_unc/(dgdata/aldata))

return,percent_unc

end
