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

Home » Public Forums » archive » Re: Correlate and NAN
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: Correlate and NAN [message #23157 is a reply to message #23156] Mon, 08 January 2001 08:55 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
How about using just the coincident valid data pairs that you can get
using FINITE and GET_INTERSECTION functions?

ind_1 = where(finite(data_set_1))
ind_2 = where(finite(data_set_2))
index = Setintersection(ind_1, ind_2)
result = correlate(data_set_1[index], data_set_2[index])

"Setintersection" is posted on David's home page,
http://www.dfanning.com/tips/set_operations.html. Although it is called
there *Setintersection*, although it does not *set* anything, it returns
what you need :-)

Cheers,
Pavel

Ben Tupper wrote:
>
> Hello,
>
> I have two datasets that I would like to correlate using the CORRELATE
> function. Each dataset has some members flagged as NANs; the NANs are
> not neccessarily coincident. The online documentation makes no mention
> of NAN-handling, but the procedure in the lib directory indicates (see
> modifications history) that it handles NANs (although there is no
> keyword for it). It doesn't really handle NANs the way I expect it
> to. For example, repeated calls to the TOTAL function don't set the
> keyword NAN, so TOTAL doesn't check for NANs.
>
> I'm not sure if it is reasonable to involve NANs in a correlation... but
> it seems reasonable to request that the routine ignore NANs in the input
> arguments.
>
> Is there a simple solution to this NAN-jam?
>
> Thanks,
>
> Ben
>
> --
> Ben Tupper
> Bigelow Laboratory for Ocean Sciences
> 180 McKown Point Rd.
> W. Boothbay Harbor, ME 04575
> btupper@bigelow.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: count number of pixels and write to a txt file
Next Topic: IDL routine to find contiguous groups of pixels falling within an intensity range

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

Current Time: Wed Oct 08 17:30:47 PDT 2025

Total time taken to generate the page: 0.14684 seconds