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

Home » Public Forums » archive » FINITE function
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: FINITE function [message #90051 is a reply to message #90050] Wed, 21 January 2015 04:20 Go to previous messageGo to previous message
andeh is currently offline  andeh
Messages: 23
Registered: April 2011
Junior Member
On Wednesday, 21 January 2015 12:14:55 UTC, AJAS wrote:
> On Wednesday, 21 January 2015 12:00:29 UTC, g.na...@gmail.com wrote:
>> Hi I used the FINITE() function as suggested to find out whether there are nans or infinity numbers in my array. The problem is that I cannot understand the output of that function. I set the keyword SIGN = 1 but I got -1 inthe outcome.
>>
>> Below is a part of the code:
>>
>> DataArray ; contains the 3D data
>>
>> for i = 0, 199 do begin
>> for j = 0, 199 do begin
>> Barray = DataArray[*,i,j] - Array[i,j]
>> print, where(finite(Barray), /INFINITY, SIGN=1))
>> endfor
>> endfor
>>
>> I got the -1 value thousands of times maybe and I am not even able to figure out in which place of that array there are infinity or nans (if there are any)
>>
>> Can anyone help with this?


Ah. Just saw your previous posts.
You are looking for positive infinities?
You have not put the brackets in the correct place around your FINITE function and you could test to see if there are any valid elements using the COUNT keyword to WHERE.

How about:


for i = 0, 199 do begin
for j = 0, 199 do begin
Barray = DataArray[*,i,j] - Array[i,j]
w = where(finite(Barray, /INFINITY, SIGN=1), COUNT=count)
IF count GT 0 THEN PRINT, w
endfor
endfor
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIGLIO DI PUTTANA, MANDANTE DI OMICIDI: PAOLO BARRAI DI CRIMINALI WMO, BSI ITALIA SRL, BLOG "MERDATO" LIBERO! MINACCIA DI MORTE CHI LO FOTOGRAFA E SE "COSTUI" INSISTE, L'OMICIDA PAOLO BARRAI FA UCCIDERE O "SUICIDARE" DAVVERO!
Next Topic: map function for astronomy

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

Current Time: Fri Oct 10 06:59:23 PDT 2025

Total time taken to generate the page: 1.68112 seconds