harmonica icon indicating copy to clipboard operation
harmonica copied to clipboard

Forward model magnetic properties of prism_layer

Open markgrujic opened this issue 2 years ago • 3 comments

Description of the desired feature:

There are certain scenarios where forward modelling the magnetic effect of layers is meaningful (e.g. topography). It seems that prism_layer can be used to define these layers and perhaps even assign magnetic properties, however there does not appear to be a mag equivalent to prism_gravity to perform the forward operation for the magnetic field. I can think of some things that would be needed, including:

  • harmonica.prism_magnetic, jit_prism_magnetic, and new kernels for different mag fields that would need inducing field parameters
  • magnetic() defined in DatasetAccessorPrismLayer so that prism_layer.magnetic could call harmonica.prism_magnetic
  • new constants defined
  • changes to the dispatcher to account for gravity or mag

Are you willing to help implement and maintain this feature?

Happy to help where I can, probably best suited to testing though!

markgrujic avatar Apr 12 '23 04:04 markgrujic

Hi @markgrujic! Thanks for opening this issue. We are aware that a lot of people will benefit from having forward modelling of magnetic fields in Harmonica (see https://github.com/orgs/fatiando/discussions/100 and https://github.com/orgs/fatiando/discussions/102).

The good news is that we are working on it. All the kernels for the magnetic fields of prisms and dipoles live in Choclo and I've started a PR for adding magnetic forward modelling functions for prisms (see #369).

I think @aguspesce will start working on adding a magnetic_field method to the prism layer accessor so we can easily compute the magnetic field of a layer of prisms.

We'll be glad if you would like to contribute! Is there anything that you would like to start working on?

santisoler avatar Apr 13 '23 16:04 santisoler

Hello @santisoler and @markgrujic I will start to work on this today!

aguspesce avatar Apr 13 '23 18:04 aguspesce

Aha, perfect! Makes sense to keep the kernels in choclo 🌽. I'll keep an eye on this and those linked discussions. Cheers

markgrujic avatar Apr 14 '23 03:04 markgrujic