Skip to content

Commit 56dd7ef

Browse files
fix sensor at zero
1 parent a9043f3 commit 56dd7ef

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎src/qtics/instruments/network/proteox/recognized_states.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ def build_conditions() -> dict[str, Condition]:
133133
key="PT2_STAGE_COLD",
134134
label="DRI-PT2-S < 5 K",
135135
evaluator=lambda s: (
136-
_safe_float(s.get("DR2_T")) is not None
136+
_safe_float(s.get("DR2_T")) != 0.0
137+
and _safe_float(s.get("DR2_T")) is not None
137138
and _safe_float(s.get("DR2_T")) < 5.0
138139
),
139140
suggestion_if_false="Wait/cool until PT2 stage temperature (DRI-PT2-S) < 5 K.",
@@ -143,7 +144,8 @@ def build_conditions() -> dict[str, Condition]:
143144
key="MIX_CHAMBER_COLD",
144145
label="DRI-MIX-S < 2 K",
145146
evaluator=lambda s: (
146-
_safe_float(s.get("MC_T")) is not None
147+
_safe_float(s.get("MC_T")) != 0.0
148+
and _safe_float(s.get("MC_T")) is not None
147149
and _safe_float(s.get("MC_T")) < 2.0
148150
),
149151
suggestion_if_false="Cool mixing chamber until DRI-MIX-S < 2 K.",
@@ -205,7 +207,8 @@ def build_conditions() -> dict[str, Condition]:
205207
key="MIX_CHAMBER_PRECOOLED",
206208
label="DRI-MIX-S < 6 K",
207209
evaluator=lambda s: (
208-
_safe_float(s.get("MC_T")) is not None
210+
_safe_float(s.get("MC_T")) != 0.0
211+
and _safe_float(s.get("MC_T")) is not None
209212
and _safe_float(s.get("MC_T")) < 6.0
210213
),
211214
suggestion_if_false="Wait/cool until DRI-MIX-S < 6 K.",
@@ -215,7 +218,8 @@ def build_conditions() -> dict[str, Condition]:
215218
key="SORB_COLD",
216219
label="SRB-GGS-S < 6 K",
217220
evaluator=lambda s: (
218-
_safe_float(s.get("SRB_T")) is not None
221+
_safe_float(s.get("SRB_T")) != 0.0
222+
and _safe_float(s.get("SRB_T")) is not None
219223
and _safe_float(s.get("SRB_T")) < 6.0
220224
),
221225
suggestion_if_false="Wait/cool until SRB-GGS-S < 6 K.",

0 commit comments

Comments
 (0)