QC filter: require >= 4 P and >= 4 S picks (was > 4 / >= 5)#9
Open
mdenolle wants to merge 1 commit into
Open
Conversation
The QC threshold filter used `p_picks > 4 & s_picks > 4`, which requires at least 5 P and 5 S picks, but the output file is named `..._p_4_s_4_...` and the methods describe a minimum of 4. Change to `>= 4` so the code matches the documented (and more generous) threshold. CHANGES A PUBLISHED OUTPUT: events with exactly 4 P and/or exactly 4 S picks (and RMS < 2.5) now pass QC, so `origin_..._p_4_s_4_rms_2_5.csv` will contain more events. The notebook must be re-run to regenerate that CSV. Updated the active filter, the plot title, and the commented gap-filter variant in both tracked copies (3_post_processing/ and 4_relocation/quality_control/). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the QC pick-count threshold in the two tracked qc_metrics_all_regions_reloc_cog_ver3_cc.ipynb notebooks so the implemented filter matches the documented/catalog-naming intent of “minimum 4” picks.
Changes:
- Changed the QC filter from
(p_picks > 4) & (s_picks > 4)to(p_picks >= 4) & (s_picks >= 4)(keepingrms < 2.5unchanged). - Updated the corresponding plot header/title strings from
> 4to>= 4. - Updated the commented “gap-filter” variant to use the same
>= 4threshold.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| 4_relocation/quality_control/qc_metrics_all_regions_reloc_cog_ver3_cc.ipynb | Updates the active QC filter, plot title, and commented gap-filter variant to require ≥4 P/S picks. |
| 3_post_processing/qc_metrics_all_regions_reloc_cog_ver3_cc.ipynb | Mirrors the same QC threshold/title updates in the post-processing copy of the notebook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
708
to
+709
| "# Filter and sort the data\n", | ||
| "_df = df[(df.rms<2.5) & (df.p_picks > 4) & (df.s_picks > 4)].sort_values('rms', ascending=False)\n", | ||
| "_df = df[(df.rms<2.5) & (df.p_picks >= 4) & (df.s_picks >= 4)].sort_values('rms', ascending=False)\n", |
Comment on lines
708
to
+709
| "# Filter and sort the data\n", | ||
| "_df = df[(df.rms<2.5) & (df.p_picks > 4) & (df.s_picks > 4)].sort_values('rms', ascending=False)\n", | ||
| "_df = df[(df.rms<2.5) & (df.p_picks >= 4) & (df.s_picks >= 4)].sort_values('rms', ascending=False)\n", |
Open
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The QC threshold filter used
p_picks > 4 & s_picks > 4, i.e. it required ≥5 P and ≥5 S picks — but the output file is named..._p_4_s_4_...and the methods describe a minimum of 4. Per decision, change the code to match the documented (and more generous) ≥4 threshold.Effect: events with exactly 4 P and/or exactly 4 S picks (and
RMS < 2.5) now pass QC. The filtered catalogorigin_2010_2015_reloc_cog_ver3_cc_p_4_s_4_rms_2_5.csvwill contain more events. The notebook must be re-run to regenerate that CSV — this PR only changes the code, not the CSV.Change
(df.p_picks > 4) & (df.s_picks > 4)→(df.p_picks >= 4) & (df.s_picks >= 4)Applied to the active filter, the plot title (
P and S Picks > 4→>= 4), and the commented gap-filter variant, in both tracked copies:3_post_processing/qc_metrics_all_regions_reloc_cog_ver3_cc.ipynb4_relocation/quality_control/qc_metrics_all_regions_reloc_cog_ver3_cc.ipynbDiff is 10 lines per file; embedded outputs untouched.
Notes
4_relocation/qc_metrics_all_regions_reloc_cog_ver3_cc.ipynbexists in the working tree with the old> 4threshold. It is not in version control; recommend deleting it or consolidating the three copies so they can't diverge.🤖 Generated with Claude Code