3

I have a three columns data, two columns spatial coordinates and in the third column, one property of my data which I am interested to compute the auto-correlation between this parameter according their spatial separation.

X  Y ellipticity
7796.94 190.754 0.473162 
8572.75 264.647 -0.154701 
7503.24 229.256 -0.486455 
8283.70 227.214 0.186650 
1950.70 225.452 -0.136786 
3441.52 190.175 -0.202818 
3724.03 207.877 0.401871 
2228.14 218.487 -0.0455063 
1743.08 212.528 -0.0428524 
4130.26 199.190 0.468680 
1557.94 206.700 -0.0365743 
3708.06 233.734 -0.177434 
8379.25 216.740 -0.0792299 

I am wondering whether there is a library in python which I can use and it helps me to measure this quantity?

Dalek
  • 4,168
  • 11
  • 48
  • 100
  • [this question](http://stackoverflow.com/questions/643699/how-can-i-use-numpy-correlate-to-do-autocorrelation) might be helpful – Ben Southgate Jan 15 '14 at 18:37
  • Actually, what you're looking for is called a "variogram" (It goes by other names, too. "variogram" is specific to geostatistics.) – Joe Kington Jan 15 '14 at 18:51
  • Is there any python library written by geophysicist available for "variogram" measurement? – Dalek Jan 15 '14 at 19:02
  • @Dalek - Several, (just google "python geostatistics") but they're probably overkill if you just want to make a variogram/co-variogram/etc. For a small number of points (i.e. such that an NxN matrix will fit in memory), it's quite easy to make a variogram. I'll give an example in a bit (unless I forget). – Joe Kington Jan 15 '14 at 19:10
  • Thanks a lot @JoeKington. I appreciate if you could give me an example or something! – Dalek Jan 15 '14 at 19:14
  • @JoeKington Since you mentioned you might post an example I would like to remind you and the point is that actually the ellipticity component has two components, one real and the other imaginary part. So I didn't mention it for the complexity. Could you still give me some tips? – Dalek Jan 16 '14 at 15:02

0 Answers0