harmonica icon indicating copy to clipboard operation
harmonica copied to clipboard

Add a finite-difference upward derivative

Open leouieda opened this issue 2 years ago • 5 comments

The upward_derivative function gains a method argument that defaults to finite-diff. The way this works is by upward and downward continuing the grid by half of the average grid spacing and then calculating a central difference approximation for the derivative. An advantage of this method is a lower sensitivity to noise than the FFT-based one. Even though the continuation is FFT-based, it's not very sensitive to high-frequency noise.

leouieda avatar Oct 30 '23 20:10 leouieda

Trying this out. We've had good experiences with it in our magnetic microscopy paper. This was much better than the FFT-based one, particularly for Euler Deconvolution where the quality of the upward derivative is very important.

Implemented a test but it's still failing. Need to see if this is something I'm doing wrong in the code of if the results aren't as good as I thought.

leouieda avatar Oct 30 '23 20:10 leouieda

@leouieda I think this PR just needs some little work to be ready, and I think it would be great to have it in the next release of Harmonica. Is that possible? What do you think?

santisoler avatar Jan 26 '24 00:01 santisoler

@santisoler not sure I'll be able to finish this in time. I'll try but don't let this be a bottleneck for a release.

leouieda avatar Feb 01 '24 16:02 leouieda

Much better in what sense for the layperson Leo?

RichardScottOZ avatar Feb 17 '24 07:02 RichardScottOZ

In the paper we were writing, it was the difference between getting completely wrong depth from Euler deconvolution and getting the correct ones. But now that I think about it, our data didn't have a lot of high frequency noise so maybe that's what's making it not so good in this case.

leouieda avatar Feb 19 '24 14:02 leouieda

Closing this. We've been experimenting with this and it doesn't really make as large of a difference as we thought. Plus, I couldn't get it to work reliably in Harmonica so maybe it was a fluke in our original microscopy code.

leouieda avatar Jun 02 '25 20:06 leouieda