comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Fanning's LogScl routine + Colorbar??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Fanning's LogScl routine + Colorbar?? [message #71841 is a reply to message #71837] Fri, 23 July 2010 10:46 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Jul 23, 1:23 pm, Joe Daal <joe.d...@gmail.com> wrote:
> Hi,
>
> I am using the logscl to enhance the contrast of an image, something
> like:
>
> loadct,39
> image = alog10(lin_image)
> imdisp, logscl(image, min=min(image), max=max(image), Exponent=8,
> Mean=0.65)
>
> where image values vary from -1.34 to +2.05, with zeroes included.
> The image looks nice for what I want, but how do I reflect a correct
> colorbar, either for real values or the scaled ones? What is
> logarithmic, the ticks or the colors?

Hi,

I would argue for both.

Example using
http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/pg_plotima ge.pro
below will show different color bars.

;create color bar array
x=findgen(1000)
y=findgen(256)
z=rebin(x,1000,256)

;case 1: log axis and log colors - that's what you want
pg_plotimage,alog(z),x,y,xrange=[1,1000],/xlog,/ylog,yrange= [1,255],/
xsty,/yst

;case 2: linear axis and log colors
;this is a "correct" but undesirable representation: the beholder of
the plot will
;not be able to make out the colors for low values of the x axis
pg_plotimage,alog(z),x,y,xrange=[1,1000],/ylog,yrange=[1,255 ],/xsty,/
yst

;case 3: linear axis and linear colors - this is what happens if you
do not log scale the image
pg_plotimage,z,x,y,xrange=[1,1000],/ylog,yrange=[1,255],/xst y,/yst

;case 4: log axis and linear colors - this is what happens if you do
not log scale the image
;but is shown in a not particularly useful representation
pg_plotimage,z,x,y,xrange=[1,1000],/ylog,yrange=[1,255],/xst y,/yst,/
xlog


Ciao,
Paolo
>
> Thanks,
> Joe
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to run a program for datasets located in different folders at a single stretch
Next Topic: Inequation resolution with IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Oct 27 05:15:13 PDT 2025

Total time taken to generate the page: 0.02839 seconds