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

Home » Public Forums » archive » Re: Assigning NaN to arrays
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: Assigning NaN to arrays [message #39278] Sun, 09 May 2004 16:18 Go to previous message
elv is currently offline  elv
Messages: 2
Registered: May 2004
Junior Member
elv@irtf.ifa.hawaii.edu (Eric Volquardsen) wrote in message news:<49b2657.0405080139.3a293765@posting.google.com>...
> I was assigning NaN to the locations of bad pixels in an image. I
> then replace the bad pixels with the median of the surrounding good
> pixels. Instead of doing so, IDL assigned 2.14748e9. Everything I
> have seen in the IDL documentation seems to indicate that this would
> work.?.
>
> w = WHERE(mask EQ 1)
> size_img = SIZE(image, /dimensions)
> size_img = size_img[0]
> image[w] = !values.f_nan
> x = w MOD size_img
> y = w / size_img
> FOR i = 0, (n_elements(w)-1) DO image[w[i]] = MEDIAN(image[x-2:x+2,
> y-2:y+2])

Found the problem. For some reason, image "decided" it was an integer array.

Thanks,

Eric
[Message index]
 
Read Message
Read Message
Previous Topic: Re: WIDGET_COMBOBOX
Next Topic: What is this error message about?

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

Current Time: Sat Mar 28 08:35:00 PDT 2026

Total time taken to generate the page: 0.04206 seconds