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

Home » Public Forums » archive » 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
BYTSCL and NAN keyword [message #38282] Tue, 02 March 2004 08:54 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
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.)

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Working with indices of WHERE
Next Topic: NR__SVDFIT issue

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

Current Time: Fri Oct 10 03:48:32 PDT 2025

Total time taken to generate the page: 1.03427 seconds