-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add total_field_anomaly
function
#510
Conversation
Implement the total field anomaly function. Add to the api index.
harmonica/_utils.py
Outdated
>>> print(tfa) | ||
50000.0 | ||
""" | ||
b_e, b_n, b_u = magnetic_field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add a small check to control that the parameter declination
is indeed in degree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion @VascoSch92. It's hard to implement such checks. There's no way we can identify if the user passed an angle in radians or in degrees, besides making assumptions upon its value. I think documenting the argument properly, and keeping the consistency among the package (all inclination and declination angles, along with all longitude and latitude angles in Harmonica as expected in degrees) is enough to make users aware what is expected for these arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right :-)
total_field_anomaly
function
Add new function that computes the total field anomaly from the magnetic field components and the inclination and declination of the IGRF. Include the function in the API index and add tests for it.
Relevant issues/PRs:
Fixes #506