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 #86187 is a reply to message #86185] Wed, 16 October 2013 21:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris Torrence writes:

> 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, Chris. I'm bushed, but I'm notorious for not being a multi-
tasker. I'm sure I'll be back at this first thing in the morning. I'll
let you know what I find out. :-)

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 13:55:41 PDT 2025

Total time taken to generate the page: 0.00451 seconds