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

Make sure observations with status=0 are not flagged suspect #126

Merged
merged 3 commits into from
Aug 30, 2021

Conversation

javierggt
Copy link
Contributor

@javierggt javierggt commented Aug 5, 2021

make sure observations with OK-status in status-override are OK regardless of what the algorithm says

Description

Currently, observations with status != 0 in the obs table of the supplement are excluded from magnitude estimates, but it turns out that observations with status == 0 are not included (Issue #121). The expected behavior is that if status == 0, then they should be marked OK even if it fails the standard cuts. This PR fixes that.

The fix is simple. It mostly follows what is done for excluded observations: there is a list of excluded observations, which are observations in the obs table with status != 0, so I added a corresponding list of included observations. The boolean OK flag considers both.

Most of the changes are for testing:

  • a test function
  • a test data HDF5 file
  • a function to re-create the test data file

Testing

  • Passes unit tests on MacOS, linux, Windows (at least one required)
  • Functional testing

Fixes #121

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

LGTMT

@taldcroft taldcroft merged commit 951a4f7 into master Aug 30, 2021
@taldcroft taldcroft deleted the include-obs-status-ok branch August 30, 2021 14:16
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.

Observations with status=0 still flagged as suspect
3 participants