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

Home » Public Forums » archive » Re: NULL value in IDL ?
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: NULL value in IDL ? [message #42320 is a reply to message #42317] Wed, 02 February 2005 00:58 Go to previous messageGo to previous message
Jerome Colin is currently offline  Jerome Colin
Messages: 8
Registered: February 2005
Junior Member
Jerome Colin wrote:
> David Fanning wrote:
>
>> Jerome Colin writes:
>>
>>> Is there in IDL a way to give a variable the value NULL, meaning 'no
>>> data' ?
>>> My problem is that I use REBIN() to reduce an image, but some parts
>>> of this image do not contain information, even is the value is zero.
>>> These zero-value pixels are hence taken into account in the REBIN()
>>> calculation, and that's what I would like to avoid.
>>
>>
>> REBIN seems to work OK with NANs:
>>
>> a = findgen(5, 5)
>> a[1,1] = !Values.F_NAN
>> b = Rebin(a, 10, 10)
>> print, b
>>
>> Cheers,
>>
>> David
>>
> Ok, now I replace values of the array with !values.f_NaN, it work properly.
> But at the end, I use a WRITE_BMP() to have a look at the result. NaN
> values cause a failure, so I tried to replace NaN values with 0. Has the
> array dimensions have changed, I cannot use the index array I previoulsy
> used :
>
> search=WHERE(data le 0.) & data(search)=!values.f_NaN
>
> And if I use :
>
> search=WHERE(newdata eq !values.f_nan)
>
> it returns -1.
>
> What kind of operator can be used to identify NaN cells in my array ?
>
> Many thanks, David !
>
> Jerome
Oups... Forget my question, I've found your answer on your web site, in
math tips 'finding NaN in arrays'.
Thank you for your help.
Jerome
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: VoIP User Group
Next Topic: How to keep image ratio in Shade_surf

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

Current Time: Sun Apr 26 22:09:05 PDT 2026

Total time taken to generate the page: 0.07941 seconds