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 #71833 is a reply to message #71830] Fri, 23 July 2010 13:32 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paolo writes:

> The two color bars plotted here
>
> http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/colbars.pn g
>
> represent the same color scaling of table 5 (stretched
> logarithmically )
> but the linear representation does compress the "interesting" bits
> of the color bar quite strongly on the left side - while the log
> representation seems to do a better job of display the quick variation
> at the left end.

Yes, I was hoping someone might have the definitive
answer here, because this whole topic confuses me, too.
I do know it is quite easy to produce "normal" log scaled
data and color tables. It gets quite a bit harder, it seems
to me, when using these fairly arbitrary log-scale functions.

Ah! Maybe it is like this:

tvlct, r, g, b, /get
rr = scale_vector(float(r), min(power), max(power), MIN=0, MAX=255)
gg = scale_vector(float(g), min(power), max(power), MIN=0, MAX=255)
bb = scale_vector(float(b), min(power), max(power), MIN=0, MAX=255)
rrr = logscl(rr, MEAN=0.45)
ggg = logscl(gg, MEAN=0.45)
bbb = logscl(bb, MEAN=0.45)
tvlct, r[rrr], g[ggg], b[bbb]

That probably makes more sense!

See the new results here:

http://www.dfanning.com/misc/logscl_new.png

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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: Wed Oct 08 19:14:33 PDT 2025

Total time taken to generate the page: 0.02890 seconds