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

Home » Public Forums » archive » Re: Logarithmic Color Scaling
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: Logarithmic Color Scaling [message #51714 is a reply to message #51712] Tue, 05 December 2006 08:07 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Is this the result you would like to get? It looks ugly
enough though...

http://www.astro.phys.ethz.ch/staff/pgrigis/coltroubles.png

I generated this using spectro_plot from solarsoft:

x=findgen(10000)
data=rebin(x,10000,10)
y=findgen(10)

spectro_plot,data,x,y,/no_ut,/xlog,xrange=[1,1d4],ystyle=1,p osition=[0.1,0.7,0.9,0.8],/noerase


Ciao,
Paolo





David Fanning wrote:
> Folks,
>
> I'm embarrassed to admit this, but I spent the entire day
> yesterday working on a logarithmic color scaling problem
> and got absolutely nowhere. I was really counting on a
> breakthrough in the shower this morning, but no joy there,
> either. :-(
>
> My dilemma is this. I can produce a log scaled image
> (using LOGSCL) and I can create a log scaled color table
> (again using LOGSCL with the method Lagos outlined yesterday).
> What I cannot do is associate a color on the color bar
> with the actual image value.
>
> In other words, when I click on the image, I can read that
> value back from the image. The value of that pixel does
> not correspond to the color representing that value
> in the color table. In fact, it is not even close. It is
> so far off, in fact, that it makes me think there is something
> absolutely fundamental that I am not understanding about the
> problem.
>
> I have thought about nothing else for 24 hours and can't
> see my way out of this problem. (Although a bulky furnace
> is going to demand some of my time today.) Has anyone
> EVER done this successfully? Could you show me a bit of
> code?
>
> I want to show a data set with values extending over
> several decades with a logarithmic color bar. The
> data set I am using is this one:
>
> image = FltArr(400, 400)
> image[30:40, 30:40] = 10
> image[50:60, 50:60] = 100
> image[70:80, 70:80] = 1000
> image[90:100, 90:100] = 2500
> image[110:120, 110:120] = 3500
> image[130:140, 130:140] = 5000
> image[150:160, 150:160] = 7500
> image[170:180, 170:180] = 10000
>
>
> I can show this data set logarithmically scaled:
>
> LoadCT, 33
> TV, LogScl(image)
>
> And I can even show the logarithmically scaled
> color values that accurately reflects the image
> values:
>
> TVLCT, r, g, b, /GET
> TVLCT, r[LogScl(index)], g[LogScl(index)], b[LogScl(index)]
> Colorbar, range=[1,10000]
>
> What I cannot show is a Colorbar with a logarithmic axis scale
> that accurately shows the image colors. :-(
>
> Colorbar, Range=[1,10000], XLOG=1, XTICKS=0, MINOR=5
>
> I am VERY open to ideas. :-)
>
> Cheers,
>
> David
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL_IDLBridge GetVar vs. Shared Memory
Next Topic: IDL 6.3 Directory Change?

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

Current Time: Sat Oct 11 00:24:15 PDT 2025

Total time taken to generate the page: 1.04117 seconds