	pro gr_fits,x,header,hstruc

device,get_scr=scr


	index=-1

	filnam=pickfile(/read)


	if filnam eq '' then goto,exit

x=rfitsg(filnam,index=fnum,key_struct=hstruc,header=header,error=err, $
               user_struct=ustruc,date_obs=date,time_obs=time,/sc)

;x=x*hstruc.bscale+hstruc.bzero

Sz=size(x)

window,/free,xsi=Sz(1),ysi=Sz(2),tit=(name_extract(filnam))(0)+', '+	$
	string(Sz(1),Sz(2),format='(i4,"x",i4," pix")'),xpo=scr(0)-Sz(1), $
		ypo=scr(1)-Sz(2)

tvscl,x
xloadct
	xquestion,aaa,text='Do you want to see the header?'
	if strlowcase(aaa) eq 'yes' then xtext,text=header
exit:

	end

