fatiando / harmonica

Forward modeling, inversion, and processing gravity and magnetic data
https://www.fatiando.org/harmonica
BSD 3-Clause "New" or "Revised" License
210 stars 69 forks source link

Compute total field anomaly from magnetic field components #506

Closed santisoler closed 1 month ago

santisoler commented 3 months ago

Description of the desired feature:

As discussed in today's meeting, it would be nice to include a function to compute the total field anomaly from the magnetic field components and with inclination and declination of the regional field. A function like such would be necessary to implement the ideas described in #426.

The function could be called total_field_anomaly and look something like:

def total_field_anomaly(magnetic_field, inc, dec):
    b_e, b_n, b_u = magnetic_field
    ...
    tfa = ...
    return tfa

In order to get this done we should:

  1. Implement the function in harmonica/_utils.py.
  2. Make sure we are importing it in harmonica/__init__.py so it's accesible.
  3. Add the new function to doc/api/index.rst.
  4. Write tests for the function.

Are you willing to help implement and maintain this feature?

From what we talked in today's meeting, @indiauppal is willing to take the lead for this 🚀. I'll let her assign herself to this issue if she wants to.

indiauppal commented 3 months ago

Tests: