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

Home » Public Forums » archive » More Kriging Problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
More Kriging Problems [message #86181] Wed, 16 October 2013 18:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Sorry to keep bringing bad news about the new fast kriging algorithm
Chris provided last week, but I don't think it is working correctly.
Aside from problems with the model functions, I think there is something
wrong with the way regular grids are processed with the function.

I have been trying to use the Krig2D function to "repair" small holes in
larger arrays. I've been using an 11x11 array for this process, but I am
getting very strange results.

I've made the programs I am using available here:

http://www.idlcoyote.com/misc/krig_problem.zip

There are three PNG files in the zip file. One of the original
data. One using the current Krig2D method in IDL 8.2.3 (which is
basically identical to the original data set, as I would expect),
and one using my cgKrig2D routine (included in the zip file), which
produces a surface not at all like the original data. I *try* to create
a surface with the fast kriging routine Chris gave us last week, but I
can't get this program to run without an error. I have renamed the
functions in this program, which I call krig2d_fast and include in the
zip file, so there is no confusion with the original Krig2D routine.

The fact that krig2d_fast doesn't run confuses me, because as far as I
can determine my cgKrig2D program is a faithful copy of this routine.
The only thing I *believe* to be different about it is that I have
modified the model functions to produce what I think are the correct
results.

In any case, I can't get it to run with my simple data set. Here is the
main-level program I am using to investigate the problem. I recreate the
values array each time, because I also suspect these programs are
modifying the variable, but I haven't had time to chase that down and
confirm it.

I produce the PNG files from the first three graphics commands.

; Original data.
values = Dist(11)
smdims = Size(values, /Dimension)
cgSurface, values, Title='Original Values'

; Surface from current Krig2D program.
values = Dist(11)
sampled1 = Krig2d(values, findgen(smdims[0]), $
findgen(smdims[1]), /Regular, NX=11, NY=11, Spherical=[5.0, 0.0])
cgSurface, sampled1, Title='Original Krig2D Values'

; Surface from my cgKrig2D program.
values = Dist(11)
sampled2 = cgKrig2d(values, findgen(smdims[0]), $
findgen(smdims[1]), /Regular, Spherical=[5.0, 0.0])
cgSurface, sampled2, Title='cgKrig2D Values'

; Surface from the fast krig2d program of Chris Torrence, offered
; last week on newsgroup. This fails with error.
values = Dist(11)
sampled3 = Krig2d_Fast(values, findgen(smdims[0]), $
findgen(smdims[1]), /Regular, Spherical=[5.0, 0.0])
cgSurface, sampled3, Title='Fast Krig2D Values'
END


I spent the whole day on this, and I'm feeling frustrated. Any ideas
gratefully accepted. :-)

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: How to read a csv file?
Next Topic: RGB Triangle of Colors.

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

Current Time: Wed Oct 08 16:02:42 PDT 2025

Total time taken to generate the page: 0.00450 seconds