Skip to content

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

Description

@LemurPwned

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions