Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute total field anomaly from magnetic field components #506

Open
santisoler opened this issue Jun 11, 2024 · 1 comment · May be fixed by #510
Open

Compute total field anomaly from magnetic field components #506

santisoler opened this issue Jun 11, 2024 · 1 comment · May be fixed by #510
Labels
enhancement Idea or request for a new feature
Milestone

Comments

@santisoler
Copy link
Member

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.

@santisoler santisoler added the enhancement Idea or request for a new feature label Jun 11, 2024
@santisoler santisoler changed the title Function to compute the total field anomaly from magnetic field components Compute total field anomaly from magnetic field components Jun 11, 2024
@santisoler santisoler added this to the v0.7.0 milestone Jun 11, 2024
@indiauppal
Copy link
Member

Tests:

  • Get the correct output
  • Pass both tuple of floats/arrays to magnetic field
  • Pass float/array to inc and dec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants