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

Home » Public Forums » archive » Re: How to correct errors an 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: How to correct errors an IDL [message #82379 is a reply to message #82377] Sat, 08 December 2012 00:57 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den lördagen den 8:e december 2012 kl. 09:24:38 UTC+1 skrev Dry in water:
> Hello all,
>
>
>
> when I imported an image with 4 bands into IDL using 'import image file' tool, but 'Program caused arithmetic error: Floating illegal operand' error appeared on command history window. So I imported this image using openr command.
>
>
>
> openr,1, 'D:\tmp\temp\temp_2000.tif'
>
> temper=fltarr(2894,4584,4)
>
> readu,1,temper
>
> close,1

I don't know anything about the "import image tool". Do you know that it supports tiff files?

Reading an image with openr and readu like you do works only if the file has no header. Surely tiff files start with at least some meta information? Did you display the images and do they look anything like you expect them to? If not, you may want to try using

temper = READ_TIFF ( Filename )

instead.


> Then I wanted to find out the indices of 'temper' that are not valid float-point numbers using finite command. But this command gave me just a number(-1). So I want to ask why finite command didn't show me all the location of not valid float-point numbers.
>
> Here is a command;
>
>
>
> print, where(~finite(temper))
>
> -1
>
> % Program caused arithmetic error: Floating underflow

If you get different results from reading the file in two different ways, there is a good chance at least one of those ways of reading is wrong.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Some IDL8.2.1 Workbench related problems
Next Topic: meanclip

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

Current Time: Fri Oct 10 03:30:49 PDT 2025

Total time taken to generate the page: 0.39727 seconds