harmonica icon indicating copy to clipboard operation
harmonica copied to clipboard

Pseudogravity transformation

Open RichardScottOZ opened this issue 4 years ago • 12 comments

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.

RichardScottOZ avatar Nov 14 '21 09:11 RichardScottOZ

Also will note this https://pubs.er.usgs.gov/publication/tm7C17 Which has software available via anonymous ftp.

RichardScottOZ avatar Nov 16 '21 02:11 RichardScottOZ

https://pubs.usgs.gov/of/1995/ofr-95-0077/of-95-77.html - longer list of old stuff - dosbox, anyone?

RichardScottOZ avatar Nov 16 '21 05:11 RichardScottOZ

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.

LL-Geo avatar Nov 17 '21 02:11 LL-Geo

Makes sense to me.

RichardScottOZ avatar Nov 17 '21 02:11 RichardScottOZ

If I remember correctly from previous discussions, the idea was to have 2 tiers of functions:

  1. The frequency domain filter. This function takes frequency domain input, applies the filter, and returns frequency domain output.
  2. 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.

leouieda avatar Nov 23 '21 11:11 leouieda

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.

RichardScottOZ avatar Nov 23 '21 23:11 RichardScottOZ

So, could be a holiday tinkering project, too - how would you like to approach?

RichardScottOZ avatar Dec 20 '21 01:12 RichardScottOZ

and here etc. https://github.com/fatiando/harmonica/issues/162

these are in /filters in @santisoler fft branch I think?

RichardScottOZ avatar Jan 17 '22 03:01 RichardScottOZ

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.

RichardScottOZ avatar Jan 17 '22 03:01 RichardScottOZ

Yep~ I drafted a function for FFT based filter with all these transformations. I'll upload it later today.

LL-Geo avatar Jan 17 '22 03:01 LL-Geo

Great, looking forward to it!

RichardScottOZ avatar Jan 17 '22 03:01 RichardScottOZ

Need to remember to link LL work here.

RichardScottOZ avatar Jul 20 '22 13:07 RichardScottOZ