Make the magnetization direction required in RTP#661
Merged
Conversation
Member
Author
|
Based on the branch of #608 so needs to be rebased to main when that one is merged. |
When doing reduction to the pole, the magnetization direction should be required since it's impossible to do without assuming something about it. Making the parameters required makes it more explicit that induced-only magnetization is being assumed and forces the user to have to think about it. Modify the examples to reflect this and all use the new IGRF14 class to calculate the field direction instead of having magic numbers from somewhere else.
2b7ea0e to
e35a572
Compare
Member
Author
|
@santisoler @mdtanker rebased and ready. Not a major change but it will break backward compatibility slightly. |
santisoler
approved these changes
Apr 8, 2026
Member
santisoler
left a comment
There was a problem hiding this comment.
Looks good to me. As we discussed previously, I think it's fine to introduce this backward incompatibility at this stage. It won't be a major problem for users, since updating their code would just involve passing the extra inclination and declination angles.
Member
Author
|
Alright, merging it in! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When doing reduction to the pole, the magnetization direction should be required since it's impossible to do without assuming something about it. Making the parameters required makes it more explicit that induced-only magnetization is being assumed and forces the user to have to think about it. Modify the examples to reflect this and all use the new IGRF14 class to calculate the field direction instead of having magic numbers from somewhere else.
Relevant issues/PRs: Fixes #440