cjohnson318 / geostatsmodels

This is a collection of geostatistical scripts written in Python
MIT License
150 stars 77 forks source link

Hi, degree function is erroneous #7

Open lynochka opened 7 years ago

lynochka commented 7 years ago

Hi,

I am sorry I believe your bearing function is erroneous

p1 = [1.0, 0.0] p0 = [2.0, -0.1] from geostatsmodels import utilities
utilities.bearing( p0, p1 )

should be close to 90 degrees but results in 275.71.

I also know that angle tolarance function (lagindices) is wrong but I could not tell exactly where. The reason is, if you do not exclude indices as you do by "indices = np.array([ i for i in indices if i[1] > i[0] ])", the resulting pairs of indicies might be assymetric, check with np.allclose(np.sort(indices[:,0]), np.sort(indices[:,1])). Tell me if you need more information. Do we use the same definition for tolerance?

wenouyang commented 7 years ago

Hi lyonchka,

Have you tested the test_simple_kriging.py? Running kv = kriging.krige(data,kriging.spherical,hs,bw,u,N) gives the following error message. Have you meet the following problem? Thanks.

capture