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 #38281 is a reply to message #38280] Tue, 02 March 2004 09:13 Go to previous messageGo to previous message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
Kenneth Bowman <k-bowman@null.tamu.edu> wrote:
> Has anyone else noticed this problem with BYTSCL and the NAN keyword?

> The BYTSCL function scales integers and floats into bytes between 0 and
> 255 (or the value set by the TOP keyword). If the NAN keyword is set,
> NANs in the input array are set to 0 in the output array. But 0 falls
> into the valid range for good values (0 to TOP)!

> Because it is not possible to set NANs to a value outside the valid
> range (greater than TOP), it is not possible to distinguish missing from
> valid data.

> As best I can tell, the only solution is to not use the NAN keyword and
> scale the valid data only by using WHERE to find all the valid values.
> Am I missing something obvious? (Quite possible, I admit.)

Yes, remember the NaN locations *before* you BYTSCL. Use
http://www.dfanning.com/tips/check_nan.html
to do this.

Then afterwards you can do something to the BYTSCLd array to put the NaNs
back in appropriately.

--
Edd
[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 00:47:47 PST 2025

Total time taken to generate the page: 1.28186 seconds