Viewing contents of file '../idllib/astron/contrib/varosi/vlibm/allpro/deconv_restore.pro'
pro deconv_restore, file_name, deconv_infos, deconv_result, $
					COUNT_INDEX=index, STATUS=status, $
					IMAGE=image, PSF=psf, VERBOSE=verb

; Restore deconvolution results from files.
; Frank Varosi NASA/GSFC 1992.

	if N_elements( verb ) NE 1 then verb=0

	restore, file_name, VERB=verb

	if N_struct( deconv_info ) NE 1 then begin
		message,"unknown file: " + file_name,/INFO
		status = -1
		return
	   endif

	if (index LE 0) then begin
		print," Date: " + deconv_info.systime0
		print_stats, deconv_info.method
		print_stats, deconv_info.data_name
		print," "
		print_stats, deconv_info.image_stats,/TITLE
		print_stats, deconv_info.psf_stats
	  endif else $
	    if (deconv_info.systime0 NE deconv_infos(0).systime0) then begin
		message,"identity mismatch on file: " + file_name,/INFO
		status = -1
		return
	   endif

	if (!Version.Arch EQ '386i') then begin

		copy_struct_inx, deconv_info, deconv_infos, INDEX_TO=index, $
					 EXCEPT=["image_stats","psf_stats"]
		image_stat = deconv_infos(index).image_stats
		copy_struct, deconv_info.image_stats, image_stat
		deconv_infos(index).image_stats = image_stat
		psf_stat = deconv_infos(index).psf_stats
		copy_struct, deconv_info.psf_stats, psf_stat
		deconv_infos(index).psf_stats = psf_stat
		deconv_infos(index).psf_stats = deconv_info.psf_stats

	  endif else  copy_struct_inx, deconv_info, deconv_infos, $
					 INDEX_TO=index, /RECUR_TANDEM
	status = 1
	if N_elements( image_deconv ) GT 1 then deconv_result = image_deconv
end