Skip to content

Commit 4d7623b

Browse files
committed
feat(test_plots): add smooth coherence
1 parent f160648 commit 4d7623b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cryoswath/test_plots/waveform.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,26 @@ def coherence(waveform, *,
3535
):
3636
if ax is None:
3737
ax = plt.subplots()[1]
38+
h_smooth = gauss_filter_DataArray(waveform.coherence_waveform_20_ku, "ns_20_ku", 35, 35).plot(c=".7", label="smooth")[0]
39+
h_list = [h_smooth]
3840
try:
3941
if plot_properties["threshold"]["facecolor"] is None:
4042
plot_properties["threshold"]["facecolor"] = ax.get_facecolor()
4143
y0 = -1
4244
h_thr = ax.add_patch(mpl.patches.Rectangle((-100, y0),
4345
waveform.ns_20_ku[-1]+200, waveform.coherence_threshold-y0,
4446
**plot_properties["threshold"], label="threshold"))
45-
h_list = [h_thr]
47+
h_list.append(h_thr)
4648
except KeyError:
47-
h_list = []
49+
pass
4850
try:
4951
if plot_properties["omitted"]["facecolor"] is None:
5052
plot_properties["omitted"]["facecolor"] = ax.get_facecolor()
5153
x0 = -100
5254
h_omitted = ax.add_patch(mpl.patches.Rectangle((x0, -1),
5355
waveform.swath_start[0]-x0, 3,
5456
**plot_properties["omitted"], label="omitted"))
55-
h_list.insert(0, h_omitted)
57+
h_list.insert(1, h_omitted)
5658
except AttributeError:
5759
pass
5860
try:

0 commit comments

Comments
 (0)