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

Add Curvature to GridObject #100

Merged
merged 39 commits into from
Dec 9, 2024
Merged

Add Curvature to GridObject #100

merged 39 commits into from
Dec 9, 2024

Conversation

Teschl
Copy link
Contributor

@Teschl Teschl commented Dec 6, 2024

This adds the curvature function to the GridObject. Potential issue with the use of an epsilon to avoid divisions by zero, since the Matlab version does not have this. (This branch has a lot of commits since I used it before to locally test the curvature function written in C)

Copy link
Contributor

@wkearn wkearn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, @Teschl!

Notes for future reference: Curvature is numerically unstable and very sensitive both to the data and to numerical errors. There are numerical differences between this implementation and the MATLAB one especially when the denominator of the calculation is close to zero (i.e. when the gradient is zero). We should be careful about making comparisons between the two. The MATLAB implementation sets the curvature to zero when the denominator is exactly zero. This implementation instead adds a small offset to the denominator.

@wkearn wkearn merged commit 45c8c60 into TopoToolbox:main Dec 9, 2024
7 checks passed
This was referenced Dec 9, 2024
@Teschl Teschl deleted the curv branch December 12, 2024 10:36
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.

2 participants