diff --git a/messung/motor/temperatur/tor1_fassung.py b/messung/motor/temperatur/tor1_fassung.py index 1ab3e87d..7b10e178 100644 --- a/messung/motor/temperatur/tor1_fassung.py +++ b/messung/motor/temperatur/tor1_fassung.py @@ -29,6 +29,9 @@ def gruppe(a: dict, b: dict, nb: dict | None = None) -> str | None: gb, ga = str(b.get("reason") or ""), str(a.get("reason") or "") if nb and nb.get("basis_fehler") and nb.get("fassung_fehler") is None and not (gb.startswith("Temp(") or ga.startswith("Temp(")): return "Verlauf/ausser-Baum (MOTOR_ECHTER_VERLAUF, MOTOR_AUSSETZER, MOTOR_AUSSER_BAUM)" + ak = b.get("antwortkurve") + if gb.startswith("Antwortkurve") or (isinstance(ak, dict) and ak.get("abgewichen")): + return "Antwortkurve (MOTOR_ANTWORTKURVE)" if "All-in aus unfertiger" in gb: return "Uhr-All-in (MOTOR_UHR_ALLIN_LUECKE)" if "weit ueber dem Baum" in ga and "weit ueber dem Baum" not in gb: @@ -46,6 +49,9 @@ def gruppe(a: dict, b: dict, nb: dict | None = None) -> str | None: return None +QUELLE_B = os.environ.get("TOR1_QUELLE_B", "temperatur-uhr 86911151, Entwurfs-Schalterdatei 4522cbe6 (ohne v3s, ohne VORFLOP_SELBST, ohne Straddle-Tafel, ohne TEMPERATUR_JAM, Pool-Tafel wie live; River beider Arme mit MOTOR_TEMPERATUR_MS=60000)") + + def main(aus, ein, ziel, nachbau_pfad=None): nachbau = json.load(open(nachbau_pfad)) if nachbau_pfad else {} q = lies(ein) @@ -81,7 +87,7 @@ def main(aus, ein, ziel, nachbau_pfad=None): "A_wiedergabe": {"n": ohne_marke_n, "aktion_und_groesse_gleich": ohne_marke_gleich, "aktion_gleich": ohne_marke_gleich, "anteil": ohne_marke_gleich / max(ohne_marke_n, 1)}, "abweichungen": len(abw), "je_schalter": gruppen, - "quelle": {"A": "Live 2a0b655f, Live-MOTOR_ZEILE basis-rein-temperatur", "B": "temperatur-uhr 86911151, Entwurfs-Schalterdatei 4522cbe6 (ohne v3s, ohne VORFLOP_SELBST, ohne Straddle-Tafel, ohne TEMPERATUR_JAM, Pool-Tafel wie live; River beider Arme mit MOTOR_TEMPERATUR_MS=60000)"}} + "quelle": {"A": "Live 2a0b655f, Live-MOTOR_ZEILE basis-rein-temperatur", "B": QUELLE_B}} o = os.path.join(ziel, datum) os.makedirs(o, exist_ok=True) json.dump(summe, open(os.path.join(o, "summe.json"), "w"), indent=1, ensure_ascii=False)