;+ ; NAME: asinhscl_contours ; PURPoSE: ; create contour colors for overplotting. ; ; INPUTS: ; KEYWORDS: ; OUTPUTS: ; ; HISTORY: ; Began 2006-08-19 09:58:07 by Marshall Perrin ;- PRO asinhscl_contours,image,min=min,max=max,nonlinearity=nonlinearity,beta=beta,$ negative=invert,out_pos=out_pos,axis=axis,$ levels=contourlevels,contoursmooth=contoursmooth,thick=thick,$ x=x,y=y,$ c_colors=c_colors,$ _extra=_extra if ~(keyword_set(max)) then max = max(image,/nan) if ~(keyword_set(contourlevels)) then contourlevels = max/[100.,30,10,3] sz = size(image) if ~(keyword_set(x)) then x = indgen(sz[1]) if ~(keyword_set(y)) then y = indgen(sz[2]) ; MUST plot axis here to set up coords for contours imdisp,asinhscl(image,min=min,max=max,beta=beta,nonlin=nonlinearity),$ _extra=_extra,negative=invert,out_pos=out_pos,/axis ;stop ; compute colors for the contours, just a bit darker than the contourcols = asinhscl(contourlevels, min=min,max=max,nonlin=nonlinearity,beta=beta) constep=40 if keyword_set(invert) then begin ;contourcols = 255-contourcols contourcols = ((255-contourcols) >constep ) - constep endif else begin contourcols = (contourcols< (255-constep) ) + constep endelse if !d.name eq 'PS' then c_colors = contourcols else c_colors = contourcols*256L+contourcols*65536L+contourcols if keyword_set(contoursmooth) then ims = median(image,contoursmooth) else ims=image contour,ims,x,y,/over,pos=out_pos,levels=contourlevels,c_colors=c_colors,thick=thick ;,c_label=[0,1,2,3] end