kmaterna / Strain_2D

Strain rate modeling from GNSS velocity fields
MIT License
43 stars 17 forks source link

Add geostat method #5

Closed jlmaurer closed 3 years ago

jlmaurer commented 3 years ago

Add in the geostats model

jlmaurer commented 3 years ago

@kmaterna sounds good! I'm still finding a few random bugs so I'll push those after I smash a few. :)

kmaterna commented 3 years ago

@jlmaurer I pushed my first couple bug fixes for incorporating this PR smoothly. There's still something inconsistent with gpsgridder and the new gradient function; I suspect it's swapping the order of return arguments somehow. I'll work on that since I can test it easily, no need for you to.

kmaterna commented 3 years ago

Interesting discovery with "np.gradient(udata, xinc, yinc)" : it returns du/dy followed by du/dx. Something about the structure of my udata or numpy operating in row/col space? Now I'm not sure which inc should go first.

jlmaurer commented 3 years ago

So I just checked my syntax and it should be correct. I'm wondering if gpsgridder probably has x as rows and y as columns, or some such thing, which would cause the problem.

kmaterna commented 3 years ago

okay I'll check back in gpsgridder and see if I can use the gradient function in the normal way. I'd love to put the specific adjustments into their respective methods, keeping the toolbox as general as possible. likely a 4-line change coming soon.

kmaterna commented 3 years ago

got it with a transpose. should be good now.