From 7597685d30742df94658fd6f94017982fa114fe5 Mon Sep 17 00:00:00 2001 From: Leolab Cavity CAD PC <quantuminfo.leolab@gmail.com> Date: Wed, 5 Feb 2025 17:37:04 +0100 Subject: [PATCH] Fastcomtec: Added SPCM gate --- FastComtecMCS8A/labscript_devices.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/FastComtecMCS8A/labscript_devices.py b/FastComtecMCS8A/labscript_devices.py index 078e95c..a435fb8 100644 --- a/FastComtecMCS8A/labscript_devices.py +++ b/FastComtecMCS8A/labscript_devices.py @@ -6,8 +6,7 @@ # # # # ##################################################################### -from labscript import TriggerableDevice, LabscriptError, set_passed_properties, config -import numpy as np +from labscript import TriggerableDevice, Trigger, set_passed_properties, config class MCS8A(TriggerableDevice): description = 'MCS8A' @@ -15,17 +14,24 @@ class MCS8A(TriggerableDevice): @set_passed_properties( property_names={"connection_table_properties":["config_path"]} ) - def __init__(self, name, parent_device, connection, config_path="MCS8A_default_config.SET", **kwargs): + def __init__(self, name, parent_device, connection, SPCM_gate_parent=None, SPCM_gate_connection=None, config_path="MCS8A_default_config.SET", **kwargs): super().__init__(name, parent_device, connection, **kwargs) self.BLACS_connection = "SPCM MCS8A" self.config_path = config_path self.labels = {} + if SPCM_gate_parent is not None: + self.SPCM_gate = Trigger( + f"{name}_SPCM_gate", SPCM_gate_parent, SPCM_gate_connection, trigger_edge_type="falling" + ) + def acquire(self, t, duration, trigger_duration=None, label=""): if trigger_duration is None: trigger_duration = duration self.labels[t] = label self.trigger(t,trigger_duration) + if hasattr(self,"SPCM_gate"): + self.SPCM_gate.trigger(t,duration) def generate_code(self, hdf5_file): group = hdf5_file.create_group(f"devices/{self.name}") -- GitLab