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

Home » Public Forums » archive » Re: BYTSCL and NAN keyword
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: BYTSCL and NAN keyword [message #38279 is a reply to message #38276] Tue, 02 March 2004 09:26 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.1aae6fc4ef56f7829896c3@news.frii.com>,
David Fanning <david@dfanning.com> wrote:

> Well, NANs are definitely floats (that is, they have a float-type
> bit pattern). So it seems reasonable to me that if you are
> trying to stuff it into a byte (which can only have values between
> 0 and 255, that 0 is a good choice. (The only possible other
> choice is 255, but that just turns your problem on its head.)
>
> I think what I would do is locate the NANs and save their
> indices. Then scale my data into 255 colors (0 to 254), leaving
> color index 255 for the NAN color (whatever that is). This will
> take a couple of steps, but that's what IDL programs are for. :-)

Right, I understand all that. I'm just trying to understand what the
NAN keyword is good for.

If you could say NAN = 255 (or 19, or whatever), instead of just /NAN,
it would be of some use. That way the value that NANs become in the
output could be distinguished from valid data.

As it is, the NAN keyword is only of use if you are happy with NANs
turning into valid data in the output (i.e., indistinguishable from
small valid values).

I have to consider this an error in the way the handling of NANs was
implemented in BYTSCL.

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: 2D-fit
Next Topic: FastDL: An MPI interface for IDL

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

Current Time: Sat Nov 29 15:30:10 PST 2025

Total time taken to generate the page: 0.00236 seconds