PRO HR_GREY,filename,smooth=smooth,calibration=calibration,swap=swap

		if n_elements(smooth) eq 0 then smooth=4
		if n_elements(calibration) eq 0 then calibration=2000.
		if n_elements(swap) eq 0 then swap=0	
		calibration=1000./calibration

read_hr,filename,dat,hdr

dat=dat*calibration
limit=2880.
dat=smooth(dat,smooth)

factor=5.23/3.63
len=strlen(filename)

print,''
PRINT,'------------------ Useful information ------------------'
PRINT,'	Filename:		'+strmid(filename,len-12,12)
Print,'	Obs. Date:		'+hdr(1)
print,'	     Time:		'+hdr(2)
print,'	Seeing:			'+hdr(3)
print,'	Wavelength:		'+hdr(0)
print,'	Integrated frames:	'+hdr(10)
xpos=strcompress(hdr(4),/remove_all)
if xpos le 0 then begin 
strput,xpos,'S',0
endif else begin
xpos='N'+xpos
endelse
ypos=strcompress(hdr(5),/remove_all)
if ypos le 0 then begin 
strput,ypos,'E',0
endif else begin
ypos='W'+ypos
endelse
print,'	Disk coordinate:	'+xpos+', '+ypos
print,'--------------------------------------------------------'
print,''

;----------------------------------------------------------------------

dat1=congrid(dat,523/3,363/3,/interp)

psfile=strlen(filename)
psfile=strmid(filename,psfile-12,9)+'ps'

set_plot,'ps'
device,filename=psfile,/landscape,xsize=5.23*3.5,ysize=3.63*3.5,$
		xoffset=3.,bits_per_pixel=16

tvscl,dat1>(-1000)<1000
x=findgen(174)
y=fltarr(174)+0.
oplot,x,y
oplot,x,y+120.
y=findgen(121)
x=fltarr(121)+0.
oplot,x,y
oplot,x+173.,y


xconst=1./float(174)
yconst=1./float(121)
xyouts,xconst*2.,yconst*160,size=2.6,'!6 HSOS Filtergram: '+strupcase(filename),/normal
xyouts,xconst*20,yconst*145,size=1.2,'!6 Content: '+'Filtergram',/normal
xyouts,xconst*20,yconst*140,size=1.2,'!6 Date:    '+hdr(1),/normal
xyouts,xconst*20,yconst*135,size=1.2,'!6 Time:    '+hdr(2)+'UT',/normal

xpos=strcompress(hdr(4),/remove_all)
if xpos le 0 then begin 
strput,xpos,'S',0
endif else begin
xpos='N'+xpos
endelse
ypos=strcompress(hdr(5),/remove_all)
if ypos le 0 then begin 
strput,ypos,'E',0
endif else begin
ypos='W'+ypos
endelse
help,xpos,ypos

xyouts,xconst*100,yconst*145,size=1.2,'!6 Disc Coordinate:  '+xpos+', '+ypos,/normal
xyouts,xconst*100,yconst*140,size=1.2,'!6 Integrated Frame: '+hdr(10),/normal
xyouts,xconst*100,yconst*135,size=1.2,'!6 Wave Length:      '+hdr(0),/normal

xyouts,xconst*1,yconst*122,size=1.3,'!6 FOV: 5.23 x 3.63 arcmin.',/normal

arrow,xconst*185,yconst*120,xconst*195,yconst*120,/normal
arrow,xconst*185,yconst*120,xconst*185,yconst*130,/normal
xyouts,xconst*181.5,yconst*133,size=1.2,'!6 N',/normal
xyouts,xconst*195,yconst*119,size=1.2,'!6 W',/normal


device,/close
set_plot,'x'

print,''
print,'Your figure is put into:  ',psfile
print,''
;----------------------------------------------------------------------

end

