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 filtering for center packet loss #123

Merged
merged 5 commits into from
Feb 2, 2024
Merged

Conversation

PyxieLouStar
Copy link
Collaborator

@PyxieLouStar PyxieLouStar commented Jan 25, 2024

Provide the option for flagging shapes only if the computed significance value is negative.

Description

Certain effects, such as correlator packet loss, show up as a negative in the SSINS. This change allows users to set the sig_thresh value for any shape as a negative number in order to have the shape only be flagged when the significance is negative. The behavior for positive sig_thresh is unchanged: the absolute value of the significance will be used when checking for the shape.

Checklist:

Main Code Body Checklist:

  • Add or update docstring related to code change
  • Add a unit test that verifies the efficacy of the code
  • Write a tutorial if the feature would be useful to others to use
  • Update CHANGELOG.md

Scripts Checklist:

  • Add useful help strings for any arguments that are parsed
  • Manually check that the script runs and gives proper results
  • Update CHANGELOG.md

@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f87e430) 100.00% compared to head (5d2a49c) 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #123   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          908       918   +10     
=========================================
+ Hits           908       918   +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PyxieLouStar
Copy link
Collaborator Author

Negative sig_thresh for the narrow shape will not be allowed in this pr

Copy link
Owner

@mwilensky768 mwilensky768 left a comment

Choose a reason for hiding this comment

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

Hi @PyxieLouStar I looked at the changes and they look very straight-forward. The unit tests make sense.

I may revisit this code later since these if statements can technically be taken out of the loop (the answer is the same in every iteration of the loop so you can just precompute which branch to go down for each shape). I imagine this is a teeny tiny effect that will save us microseconds per obs so I'm just going to approve/merge.

@mwilensky768 mwilensky768 merged commit 8991688 into master Feb 2, 2024
26 checks passed
@mwilensky768 mwilensky768 deleted the add_packet_loss_shape branch February 2, 2024 14:26
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.

3 participants