PRO labelimg,headbytes,hival,loval,llx,lly,image_width,image_height,fac $ ,psres=psres,color=color,sun=sun,moon=moon $ ,camfilt=camfilt,date=date,rot=rot,rang=rang ; Ensure needed keywords are set IF NOT KEYWORD_SET(psres) THEN psres=120. IF NOT KEYWORD_SET(color) THEN color=0 ; Get the image header KIh=gethd(headbytes) ; display image sequence number ext=STRING(KIh.misc.sequence,FORMAT='(I3.3)') IF KEYWORD_SET(camfilt) THEN $ ext=STRING(KIh.misc.cam,KIh.misc.fw,FORMAT='(2I1)')+':'+ext XYOUTS,scl(res=psres,llx+1) $ ,scl(res=psres,lly+image_height-fac*!D.Y_CH_SIZE-1) $ ,ext $ ,/DEVICE,ALIGNMENT=0.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and exposure time XYOUTS,scl(res=psres,llx+1) $ ,scl(res=psres,lly+image_height-2*(fac*!D.Y_CH_SIZE+2)) $ ,STRING(KIh.misc.exp_scale*KIh.exp.exposure/1000. $ ,FORMAT='(F4.1,1X,"s")') $ ,/DEVICE,ALIGNMENT=0.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and image date IF KEYWORD_SET(date) THEN $ XYOUTS,scl(res=psres,llx+1) $ ,scl(res=psres,lly+(fac*!D.Y_CH_SIZE+2)+1) $ ,ymd2date(FIX(KIh.misc.dt.year),FIX(KIh.misc.dt.month) $ ,FIX(KIh.misc.dt.day),format='d$ n$ y$') $ ,/DEVICE,ALIGNMENT=0.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and image time XYOUTS,scl(res=psres,llx+1) $ ,scl(res=psres,lly+1) $ ,STRING(KIh.misc.tm.hour,KIh.misc.tm.minute,KIh.misc.tm.second $ ,FORMAT='(2(I2.2,":"),I2.2," UT")') $ ,/DEVICE,ALIGNMENT=0.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and maximum displayed Rayleighs XYOUTS,scl(res=psres,llx+image_width-1) $ ,scl(res=psres,lly+image_height-fac*!D.Y_CH_SIZE-1) $ ,STRING(FIX(hival),FORMAT='("< ",I0.0," R")') $ ,/DEVICE,ALIGNMENT=1.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and minimum displayed Rayleighs XYOUTS,scl(res=psres,llx+image_width-1) $ ,scl(res=psres,lly+1) $ ,STRING(FIX(loval),FORMAT='("> ",I0.0," R")') $ ,/DEVICE,ALIGNMENT=1.0,CHARSIZE=fac,COLOR=color,CHARTHICK=fac ; and solar azimuth if desired IF KEYWORD_SET(sun) THEN BEGIN rdmnparm,KIH.misc.dt.year,KIH.misc.dt.month,KIH.misc.dt.day $ ,KIH.misc.cam,ccol,crow,stretch,warp,camaz,site=site camaz=!RADEG*camaz sunazel,KIH.misc.dt.year,KIh.misc.dt.month $ ,KIH.misc.dt.day,KIh.misc.tm.hour $ ,KIh.misc.tm.minute,KIh.misc.tm.second $ ,solaz solaz=(solaz-camaz+360.) MOD 360. IF KEYWORD_SET(rot) THEN solaz=solaz+rang IF solaz EQ 0. THEN sunptr='' ELSE BEGIN IF solaz LT 180. THEN BEGIN sunptr='Sun>' ENDIF ELSE BEGIN sunptr='