From ee91d2544f2b57b3993b60c1c1044e347cf95c22 Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Tue, 31 Mar 2026 14:15:30 -0400 Subject: [PATCH 1/2] Add support for time_delta in FixedTransition --- kadi/commands/states.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kadi/commands/states.py b/kadi/commands/states.py index 083f84cc..aadff96a 100644 --- a/kadi/commands/states.py +++ b/kadi/commands/states.py @@ -448,6 +448,10 @@ class FixedTransition(BaseTransition): :param transition_val: single transition value or list of values """ + # If specified set the time delta for actual transition relative to command time. + # This should be an astropy time Quantity like 10 * u.s. + time_delta = None + @classmethod def set_transitions(cls, transitions_list: list[Transition], cmds, start, stop): """ @@ -478,7 +482,10 @@ def set_transitions(cls, transitions_list: list[Transition], cmds, start, stop): attrs = [attrs] for cmd in state_cmds: - transitions_list.append(Transition(cmd["date"], zip(attrs, vals))) # noqa: PERF401 + date = cmd["date"] + if cls.time_delta is not None: + date = (CxoTime(date) + cls.time_delta).date + transitions_list.append(Transition(date, zip(attrs, vals))) # noqa: PERF401 class ParamTransition(BaseTransition): From 40211b8e6b17649e33d738b78876b79d2c5afd75 Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Tue, 31 Mar 2026 14:17:25 -0400 Subject: [PATCH 2/2] Support HRC 15V state "on" from SCS-85 activation --- kadi/commands/states.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kadi/commands/states.py b/kadi/commands/states.py index aadff96a..c8b87486 100644 --- a/kadi/commands/states.py +++ b/kadi/commands/states.py @@ -803,6 +803,23 @@ class Hrc15vOn_SCS134_Transition(FixedTransition): default_value = "ON" +class Hrc15vOn_SCS85_Transition(FixedTransition): + """HRC 15V ON from SCS-85 + + This is the default in operations following release of MATLAB 2026_020 + and supercedes commanding of SCS-134. + """ + + command_attributes = {"tlmsid": "COACTSX", "coacts1": 85} + state_keys = ["hrc_15v"] + transition_key = "hrc_15v" + transition_val = "ON" + default_value = "ON" + # Actual 15V on is 22.166 s after SCS-85 activation. Source: K. Gage communication + # 2026-03-31. + time_delta = 22.166 * u.s + + class Hrc15vOff_Transition(FixedTransition): """HRC 15V OFF"""