Re: Findind NANs in unformatted image data [message #83628] |
Fri, 15 March 2013 13:35 |
steph
Messages: 3 Registered: February 2005
|
Junior Member |
|
|
Thanks a lot! I also realized that I was using the header from the original image to view the output data in ENVI. The problem with the viewing the result was that the original image had the byte order 'Network (IEEE)' and the output image had the byte order 'Host (intel)'.
A rookie mistake I suspect:)
Thanks again!
|
|
|
Re: Findind NANs in unformatted image data [message #83639 is a reply to message #83628] |
Fri, 15 March 2013 05:05  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Friday, March 15, 2013 2:36:00 AM UTC-4, steph wrote:
> Hi, I'm trying to open unformatted floating point images, add them together, and save the sum as a unformatted floating point image (see below). I can open the images, display with TVscl and print out a bit of image info (including the correct pixel values). I get an error 'Program caused arithmetic error: Floating illegal operand'. I understand this may have something to do with NANs in the images but I can't find any. I've also tried opening just one of the images and saving it using writeu. The result is an image with a few really low values and nothing resembling what I expect. ANY suggestions are very much appreciated!
You can use the FINITE() function to search for NAN values (or infinite values).
Example,
help, where(finite(image_data) EQ 0)
CM
|
|
|