Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Re: Findind NANs in unformatted image data
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
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!