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
Re: More Kriging Problems [message #86185 is a reply to message #86181] Wed, 16 October 2013 21:22 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi David,

I think I see the problem. In my latest krig2d.pro code, I am incorrectly calculating the X and Y arrays for the /REGULAR grid case. Near the end of the code are the following lines:
xx = (SIZE(x, /N_DIM) eq 2) ? x : REBIN(TRANSPOSE(x), nx, n)
yy = (SIZE(y, /N_DIM) eq 2) ? y : REBIN(TRANSPOSE(y), nx, n)

They should be:
xx = REBIN(REFORM(x, 1, n), nx, n)
yy = REBIN(REFORM(y, 1, n), nx, n)

Do you want to make the changes to the code, and see what kind of results you get? Also, I would be curious as to your speed test results. I tried your cgkrig2d code, and it seemed about the same or maybe slightly slower. Finally, the cgkrig2d results didn't quite match what I was expecting. Here is the code I used:
values = Dist(11)
smdims = Size(values, /Dimension)
sampled2 = cgKrig2d(values, findgen(smdims[0]), $
findgen(smdims[1]), /Regular, Spherical=[5.0, 0.0])
sampled3 = Krig2d(values, findgen(smdims[0]), $
findgen(smdims[1]), /Regular, Spherical=[5.0, 0.0])
s2 = surface(sampled2, window_title='cgKrig2D')
s3 = surface(sampled3, window_title='new Krig2D')

Note that the call to Krig2D is my latest fast code with the 2-line fix mentioned above.

Thanks for catching this!
-Chris
VIS
[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 13:56:52 PDT 2025

Total time taken to generate the page: 0.21527 seconds