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 mask replacement of nan and negative mag errors #18

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

sschmidt23
Copy link
Collaborator

Addresses #17 where Henrique was having problems because data contains np.nan for magnitudes and magnitude errors, and any magnitude errors that are <=0.0 (GPz by default takes the log of the errors). This adds a simple mask check to the data processing to get rid of those values. It also adds a new parameter where you can set the value to replace the negative magnitude errors with in each band. I tested this on some data where I replaces inputs so that they had some NaNs and negative mag errors and all were caught and replaced.

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@sschmidt23 sschmidt23 requested a review from hangqianjun June 24, 2024 23:19
Copy link
Contributor

@hangqianjun hangqianjun 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!

@sschmidt23 sschmidt23 merged commit 766f70e into main Jun 25, 2024
5 checks passed
@sschmidt23 sschmidt23 deleted the issue/17/gpznan branch June 25, 2024 20:40
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