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

Home » Public Forums » archive » New Fast Kriging Semivariogram Spherical Model Incorrect?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
New Fast Kriging Semivariogram Spherical Model Incorrect? [message #86172] Wed, 16 October 2013 07:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have been writing a new cgKrig2D function for my own use that provides
orders of magnitude faster kriging for general use than the (extremely!)
slow Krig2D function that is supplied with all currently released
versions of IDL. In doing so, I have come to believe that the Spherical
modeling function in both the old version of Krig2D and in the new
version Chris released here last week is incorrect.

I base my conclusion on the mathematical models described here:


http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html #//009z00000
076000000.htm

The original version of the spherical mathematical model used this code:

r = d/t[0]
v = t[1] + t[2] * (r * (1.5 - 0.5 * r *r) > 0)
z = where(d eq 0, count)
if count ne 0 then v[z] = 0
return, (t[1] + t[2]) - v

Chris believed this to be wrong, and offered this code in the new,
faster, version:

r = d/t[0] < 1
v = t[2]*(1 - r*(1.5 - 0.5*r*r))
v[WHERE(r eq 0, /NULL)] = t[1] + t[2]
return, v

This also appears to be incorrect to me. I think the correct version is
something like this:

r = d/t[0]
v = t[2]*(1 - r*(1.5 - 0.5*r*r)) + t[1]
v[WHERE(d eq 0, /NULL)] = 0
v[WHERE(d gt t[0], /NULL)] = t[1] + t[2]
return, v

What think you experts?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: reversing axes ranges with IDL 8 graphics
Next Topic: Store differents size of .fits into one single array

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

Current Time: Fri Oct 10 01:57:07 PDT 2025

Total time taken to generate the page: 0.40083 seconds