;----------------------------------------------------------------- ; tva.pro ; ; written by Andreas Reigber ; 18.11.1996 ;------------------------------------------------------------------ ; display array (mostly) automatic. No more long interactive typing ; Congrid to 512x512, if not byte the bytescale ; ; KEYWORDS: ; /WIN : Specifies window-number (default=0) ; /M : Bytescaling from 0 to 2.5*avg(image), good for SAR amplitude ;------------------------------------------------------------------ ; This software has been released under the terms of the GNU Public ; license. See http://www.gnu.org/copyleft/gpl.html for details. ;------------------------------------------------------------------ pro tva, bild, M=m, win=win, CONG=cong on_error,2 image=bild www=!d.window if www lt 0 then www=0 dum=size(image) if (dum[1] / 512.0 eq floor(dum[1] / 512.0)) and $ (dum[2] / 512.0 eq floor(dum[2] / 512.0)) and $ not keyword_set(cong) then $ image=rebin(image,512,512) else $ image=congrid(image,512,512) if (dum(0) ne 0) then begin tt=dum(dum(0) + 1) if((tt ne 1) and (not keyword_set(M))) then image=bytscl(image) if((tt ne 1) and (keyword_set(M))) then begin mm=total(image)/n_elements(image) image=bytscl(image,0,2.5*mm) endif if keyword_set(win) then www=win else win=0 if win eq 0 then www=0 window,www,xs=512,ys=512 TV, image endif return end