Inverted sign in upward derivative filter #454
Labels
bug
Report a problem that needs to be fixed
good first issue
Good for newcomers (doesn’t require deep knowledge of the project)
Description of the problem:
The upward derivative returned has an inverted sign. It looks OK when inspecting plots because a lot of us are used to the sign convention of positive downwards. But since we use heights (and thus positive upward), the sign should be the opposite of what we expect. This is meant to improve consistency between small-scale and global data (which often has a "radial" component that is positive upward).
The fix should be relatively simple. Just add a minus sign to https://github.com/fatiando/harmonica/blob/main/harmonica/filters/_filters.py#L63
Full code that generated the error
Full error message
This produces the following result:
If we use positive upward, then the positive parts of the anomaly should be decreasing towards 0 (negative derivative) and the negative parts of the anomaly should be increasing towards 0 (positive derivative).
System information
conda list
below: Not using conda.Output of conda list
The text was updated successfully, but these errors were encountered: