Pseudogravity transformation
Description of the desired feature:
I saw a mention on your google group from april of the pseudogravity transform.
If I understand it correctly, Fourier transform of magnetics, do stuff to it, transform back?
See 'pseudo' et al here.
http://www.cpgg.ufba.br/sato/cursos/geo542/all.f From Blakely, 95 'Subroutine B.27. Subroutine to transform a total-field anomaly into a pseudogravity anomaly. Anomalies are specified on a rectangular grid, assumed to be horizontal. Both dimensions must be a power of two. Requires subroutines FOURN, DIRCOS, and KVALUE. Edge discontinuities should be eliminated from input grids (see subroutine EXPAND).
Are you willing to help implement and maintain this feature?
Yes.
Also will note this https://pubs.er.usgs.gov/publication/tm7C17 Which has software available via anonymous ftp.
https://pubs.usgs.gov/of/1995/ofr-95-0077/of-95-77.html - longer list of old stuff - dosbox, anyone?
Since xrft now has pad and unpad functions, I think it might be good to define all the frequency domain filters together. Like the RTP, the Vertical Integral, and derivatives. Then we can call and combine these filters to get what we need.
We might need another function to calculate the IGRF field to make the ambient field works here.
Makes sense to me.
If I remember correctly from previous discussions, the idea was to have 2 tiers of functions:
- The frequency domain filter. This function takes frequency domain input, applies the filter, and returns frequency domain output.
- Processing function. This function takes space domain input, applies FFT, calls the frequency-domain filter, applies inverse FFT, and returns space-domain output.
Most users will interact primarily with the processing function and our docs should focus on that. The frequency domain function is for internal use and for more advances use cases.
We could always implement just the frequency domain stuff first and add the other function in case it's really needed.
Yes, I think that makes sense.
Certainly those of us that aren't geophysicists will appreciate the automagic function that takes grid and gives back the new one all finished.
So, could be a holiday tinkering project, too - how would you like to approach?
and here etc. https://github.com/fatiando/harmonica/issues/162
these are in /filters in @santisoler fft branch I think?
and this note from said pull request:
Ditch horizontal derivatives It's better to use xarray.differentiate for computing horizontal derivatives of a regular grid than using FFT-based derivative. We should add a tutorial explaining how to compute horizontal derivatives.
Yep~ I drafted a function for FFT based filter with all these transformations. I'll upload it later today.
Great, looking forward to it!
Need to remember to link LL work here.