kmaterna / Strain_2D

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

Is there any way to export dvndx, dvedy instead of exy for each method? #33

Open fengnian-chang opened 8 months ago

fengnian-chang commented 8 months ago

Hi, I'm trying to calculate the strain rate by combining the Ve results from InSAR with the Vn results obtained by averaging the various Strain_2D methods. However, I find that averaging the Vn obtained in the various methods and then solving for the derivative leads to a clear demarcation (see the attached fig1), which is slightly different from averaging the eyy of the various methods (smoother, fig2). image

image

So I was wondering if I could export the dvndx in each method so I could get smoothed derivatives to combine with the InSAR.

jlmaurer commented 5 months ago

Hey @fengnian-chang thanks for posting this issue! Apologies for the delay in responding. I've not seen this issue before; are you using either the Delaunay or the local average gradient method? These methods can result in step changes in velocity if the data are not sufficiently spatially dense, which is probably not what you want. I'd recommend using the other methods instead. In terms of exporting, it's not currently possible to export dv/dx, but what you can do is just calculate it directly, because the grid spacing is constant. Just take a look at the code here, here, and here to determine what the grid spacing should be and calculate derivatives.