Skip to content

Make the magnetization direction required in RTP#661

Merged
leouieda merged 2 commits intomainfrom
rtp-magnetization
Apr 8, 2026
Merged

Make the magnetization direction required in RTP#661
leouieda merged 2 commits intomainfrom
rtp-magnetization

Conversation

@leouieda
Copy link
Copy Markdown
Member

@leouieda leouieda commented Apr 7, 2026

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

@leouieda
Copy link
Copy Markdown
Member Author

leouieda commented Apr 7, 2026

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.
@leouieda leouieda force-pushed the rtp-magnetization branch from 2b7ea0e to e35a572 Compare April 7, 2026 18:11
@leouieda leouieda marked this pull request as ready for review April 7, 2026 18:12
@leouieda
Copy link
Copy Markdown
Member Author

leouieda commented Apr 7, 2026

@santisoler @mdtanker rebased and ready. Not a major change but it will break backward compatibility slightly.

Copy link
Copy Markdown
Member

@santisoler santisoler left a comment

Choose a reason for hiding this comment

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

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.

@leouieda leouieda merged commit 479c36f into main Apr 8, 2026
18 checks passed
@leouieda leouieda deleted the rtp-magnetization branch April 8, 2026 18:00
@leouieda
Copy link
Copy Markdown
Member Author

leouieda commented Apr 8, 2026

Alright, merging it in!

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.

Source magnetization direction should not be optional in reduction to the pole

2 participants