Skip to content

Commit ba01a29

Browse files
committed
Spectral plots: add "ignored" next to the S/N ratio
If the spectrum is ignored because of a S/N ratio too low or impossible to compute.
1 parent 6b202d9 commit ba01a29

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Copyright (c) 2011-2025 Claudio Satriano <satriano@ipgp.fr>
4444
- New plot: raw traces
4545
- Stacked spectra: color spectral curves according to the weighting function
4646
- Spectral plots: show information on the reason why a fit failed
47+
- Spectral plots: add "ignored" next to the S/N ratio if the spectrum is
48+
ignored because of a S/N ratio too low or impossible to compute
4749
- `plot_sourcepars`: possibility of selecting the latest runid for each event
4850
- `plot_sourcepars`: new plot type: static stress drop vs. depth
4951
- `plot_sourcepars`: option to color data points in scatter plot by another

sourcespec/ssp_plot_spectra.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ def _snratio_text(spec, ax, color, path_effects):
460460
if spec.stats.spectral_snratio is None:
461461
return
462462
snratio_text = f'S/N: {spec.stats.spectral_snratio:.1f}'
463+
if spec.stats.ignore:
464+
snratio_text += ' (ignored)'
463465
ax.text(
464466
0.95, SNRATIO_TEXT_YPOS, snratio_text, ha='right', va='top',
465467
fontsize=8, color=color, path_effects=path_effects,

0 commit comments

Comments
 (0)