Support: LENZSPITZE métrique de qualité, fig2 sur le contraste (soleil bas du 02.11)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-12 11:28:35 +01:00
1 parent 1a69e73878
commit 2e9705aea6
11 files changed
+423 -41

No files matched your search

@@ -45,17 +45,21 @@ def vignette(ax, nom, zone, titre, points, serie, vmin=10, vmax=120, rayon=22):
ax.set_xticks([]); ax.set_yticks([])
def series(serie, nom, t0, t1):
"""Temps, error_value / seuil, flux en % du flux habituel (même heure UTC, jours calmes 28-31.10)."""
FLUX = "lumière renvoyée par la cible\n(flux, % du niveau habituel)"
SNR = "contraste de la cible sur le fond\n(rapport signal/bruit, % du niveau habituel)"
def series(serie, nom, t0, t1, metrique="flux"):
"""Temps, error_value / seuil, métrique en % de son niveau habituel (même heure UTC, jours calmes 28-31.10)."""
s = [d for d in serie[nom] if t0 <= d["t"] <= t1]
ref = reference_calme(serie[nom], "flux")
ref = reference_calme(serie[nom], metrique)
return ([d["t"] for d in s], [d["error_value"] / d["error_threshold"] for d in s],
[max(d["flux"], 1e-9) / ref[d["t"].hour] * 100 for d in s])
[max(d[metrique], 1e-9) / ref[d["t"].hour] * 100 for d in s])
def panneaux(axe, axf, serie, points, t0, t1, instants):
def panneaux(axe, axf, serie, points, t0, t1, instants, metrique="flux", titre=FLUX):
for nom, c, lab in points:
tt, ev, fl = series(serie, nom, t0, t1)
tt, ev, fl = series(serie, nom, t0, t1, metrique)
axe.plot(tt, ev, color=c, lw=1.8, label=lab)
axf.plot(tt, fl, color=c, lw=1.8, label=lab)
axe.axhline(1, color="black", ls="--", lw=1.2)
@@ -66,7 +70,7 @@ def panneaux(axe, axf, serie, points, t0, t1, instants):
axf.set_ylim(0.05, 300)
axf.set_yticks([0.1, 1, 10, 100], ["0,1 %", "1 %", "10 %", "100 %"])
axf.axhline(100, color="grey", ls=":", lw=1)
axf.set_ylabel("lumière renvoyée par la cible\n(flux, % du niveau habituel)")
axf.set_ylabel(titre)
for ax in (axe, axf):
for ti in instants:
ax.axvline(ti, color="grey", lw=1, ls=":")
@@ -96,21 +100,28 @@ def fig1(serie):
def fig2(serie):
"""Occultation du point 92H par une flèche de grue le 30.10 : seul le flux de 92H s'effondre."""
pts = [("92H", COUL[2], "92H (56 m)"), ("8002", COUL[1], "8002 (133 m)"), ("8017", COUL[0], "8017 (15 m)")]
"""Soleil bas dans le champ, matin du 02.11 : le contraste des cibles proches du soleil s'effondre, leur lumière non."""
pts = [("202H", COUL[2], "202H (47 m)"), ("101B", COUL[1], "101B (47 m)"), ("1009", COUL[0], "1009 (45 m, témoin)")]
fig = plt.figure(figsize=(16, 10), dpi=150)
g = fig.add_gridspec(3, 3, height_ratios=[1.25, 1, 1], hspace=0.35, wspace=0.04)
zone = (900, 620, 380, 260)
for i, (nom, tit) in enumerate([("20261030T1301Z", "13:01 UTC : avant"),
("20261030T1401Z", "14:01 UTC : charge d'un engin de levage contre 92H"),
("20261030T1501Z", "15:01 UTC : après")]):
vignette(fig.add_subplot(g[0, i]), nom, zone, tit, [("92H", COUL[2])], serie, vmin=0, vmax=255, rayon=30)
g = fig.add_gridspec(3, 2, height_ratios=[1.25, 1, 1], hspace=0.3, wspace=0.04)
zone = (1700, 600, 800, 500)
vignette(fig.add_subplot(g[0, 0]), "20261031T0701Z", zone, "31.10 à 07:01 UTC : ciel couvert",
[(n, c) for n, c, _ in pts], serie, vmin=0, vmax=255)
vignette(fig.add_subplot(g[0, 1]), "20261102T0701Z", zone, "02.11 à 07:01 UTC : soleil bas dans le champ, juste au-dessus des cibles",
[(n, c) for n, c, _ in pts], serie, vmin=0, vmax=255)
axe, axf = fig.add_subplot(g[1, :]), fig.add_subplot(g[2, :])
axf.sharex(axe)
panneaux(axe, axf, serie, pts, t("2026-10-30T12:30"), t("2026-10-30T15:30"), [t("2026-10-30T14:01")])
fig.suptitle("LENZSPITZE (Crissier) : point 92H masqué par un obstacle temporaire, 30.10.2026", fontsize=14, x=0.02, ha="left")
fig.subplots_adjust(left=0.08, right=0.86, top=0.93, bottom=0.07)
fig.savefig(ICI.parent / "output" / "fig2_occultation_92H_30-10_LENZSPITZE.png")
t0, t1 = t("2026-11-02T05:30"), t("2026-11-02T09:30")
panneaux(axe, axf, serie, pts, t0, t1, [t("2026-11-02T07:01")], "snr", SNR)
tt, _, fl = series(serie, "202H", t0, t1, "flux")
axf.plot(tt, fl, color=COUL[2], lw=1.2, ls="--", label="202H : lumière\nrenvoyée (flux)")
axf.legend(loc="upper left", bbox_to_anchor=(1.0, 1.0), frameon=False, fontsize=10)
axf.set_ylim(0.5, 300)
axf.set_yticks([1, 10, 100], ["1 %", "10 %", "100 %"])
axf.xaxis.set_major_formatter(mdates.DateFormatter("%d.%m %H:%M", tz=UTC))
fig.suptitle("LENZSPITZE (Crissier) : éblouissement par le soleil bas, matin du 02.11.2026", fontsize=14, x=0.02, ha="left")
fig.subplots_adjust(left=0.08, right=0.84, top=0.93, bottom=0.07)
fig.savefig(ICI.parent / "output" / "fig2_eblouissement-soleil_matin-02-11_LENZSPITZE.png")
def fig3(serie):