Skip to content

Add horizontal_tilt_angle function and tests #562

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ErosKerouak
Copy link

This pull request adds the horizontal_tilt_angle function to harmonica._transformations.

The horizontal tilt angle is a enhancement filter used in gravity and magnetic interpretation. It computes the arctangent of the horizontal gradient magnitude over the absolute value of the upward derivative.

Summary of changes:

  • Implemented horizontal_tilt_angle function with full docstring and LaTeX formula
  • Added unit tests based on a synthetic model
  • Input validation for grids with invalid dimensions and NaN values

Relevant issues/PRs:
Closes #559
Related to #560, #561

Implements the computation of the total horizontal derivative (THDR) of a potential
field grid. This function calculates the square root of the sum of squares of the
horizontal derivatives in the easting and northing directions.
Includes tests for:
- Agreement with a synthetic model
- Rejection of 1D and 3D grids
- Handling of grids containing NaN values

Ensures correctness and robustness of the total_horizontal_gradient filter.
Implements the theta map filter.
The function computes the arctangent of the horizontal gradient magnitude over
the total gradient amplitude. Includes a detailed docstring with formula and references.
Includes:
- Validation against synthetic model using finite differences and FFT
- Input error handling for 1D, 3D, and NaN-containing grids
- Integration of theta_map import for test discovery
Implements the horizontal tilt angle (HTA) filter, which computes the arctangent
of the horizontal gradient magnitude over the absolute value of the upward derivative.
Includes a full docstring with LaTeX formula and reference.
Includes:
- Validation against synthetic model
- Input error handling for 1D, 3D, and NaN-filled grids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add common amplitude-based filters for potential field interpretation (THDR, TDR, θ, TDX, etc.)
1 participant