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

Subregion zero Ms leads to nan in output .mx3 file #59

Open
LemurPwned opened this issue Dec 31, 2022 · 0 comments
Open

Subregion zero Ms leads to nan in output .mx3 file #59

LemurPwned opened this issue Dec 31, 2022 · 0 comments

Comments

@LemurPwned
Copy link

LemurPwned commented Dec 31, 2022

Hi,
thanks for creating this great tool.

I think found an issue when there's a nan Ms set in the output .mx3 file:

Msat.setregion(2, nan) 

This line:

array_max = np.max(array)

returns 0 for a region with a zero Ms set, which then in division leads to a nan. This nan propagates to the output .mx3 file. The function should probably return 0 if the array_max value is zero, assuming that the user did not set the Ms to a negative number.

Thanks!

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

No branches or pull requests

1 participant