;+ ; NAME: sigdisp ; PURPOSE: ; Like the IRCAL sigdisp, does a rough n-sigma linear stretch of an image. ; NOTES: ; If the values guessed for the top and bottom limits are in fact ; outside of the actual range of image values, the display range is ; truncated to the max or min as appropriate. ; ; INPUTS: ; KEYWORDS: ; OUTPUTS: ; ; HISTORY: ; Began 2003-02-14 11:15:58 by Marshall Perrin ;- pro sigdisp,image,sigrange,title=title if n_params() lt 2 then sigrange=3 sig=stddev(image) av=mean(image) print,av,sig,format='("Average = ",f8.1," Std Dev = ",f6.2)' ;exptv,image minval = av-sigrange*sig > min(image) maxval = av+sigrange*sig < max(image) print,"(Min,Max) = "+printcoo(minval,maxval) display,image,min=minval,max=maxval,/interpolate,title=title return end