Skip to content
Snippets Groups Projects
Commit 16ce5e48 authored by Sander Snoo's avatar Sander Snoo
Browse files

Fixed fast_scan1D_param and fast_scan2D_param with pulse_gates

parent e5abb3e4
No related branches found
No related tags found
No related merge requests found
import logging
from collections.abc import Sequence
from typing import Any
import numpy as np
from qcodes import MultiParameter
......@@ -162,7 +163,7 @@ def fast_scan1D_param(pulse_lib, gate, swing, n_pt, t_step,
enabled_markers=enabled_markers,
pulse_gates={
name: dict(label=name, value=value, unit="mV")
for name, value in pulse_gates
for name, value in pulse_gates.items()
},
line_margin=line_margin,
)
......@@ -351,7 +352,7 @@ def fast_scan2D_param(pulse_lib, gate1, swing1, n_pt1, gate2, swing2, n_pt2, t_s
enabled_markers=enabled_markers,
pulse_gates={
name: dict(label=name, value=value, unit="mV")
for name, value in pulse_gates
for name, value in pulse_gates.items()
},
line_margin=line_margin,
)
......@@ -489,7 +490,7 @@ class _scan_parameter(MultiParameter):
def snapshot_base(self,
update: bool | None = True,
params_to_skip_update: Sequence[str] | None = None
) -> dict[any, any]:
) -> dict[Any, Any]:
snapshot = super().snapshot_base(update, params_to_skip_update)
snapshot.update(self._snapshot_extra)
return snapshot
......
......@@ -10,14 +10,14 @@ def test1():
m_param1D = fast_scan1D_param(
pulse,
'P1', 100, 51, 2000,
'P1', 100, 41, 1000,
iq_complex=True)
m_param2D = fast_scan2D_param(
pulse,
'P1', 100, 51,
'P1', 100, 21,
'P2', 20, 21,
2000,
1000,
iq_mode='Complex')
# data1 = m_param1D()
......@@ -96,8 +96,33 @@ def test4():
return context.run('fast_scan_IQ', m_param2D)
def test5():
pulse = context.init_pulselib(n_gates=4, n_sensors=2, rf_sources=True)
m_param1D = fast_scan1D_param(
pulse,
'P1', 100, 41, 1000,
iq_mode="I",
pulse_gates={"P2": 10.0})
m_param2D = fast_scan2D_param(
pulse,
'P1', 100, 21,
'P2', 20, 21,
1000,
iq_mode="I",
pulse_gates={
"P1": 20.0,
"P2": 10.0,
"P3": -10.0,
})
return context.run('fast_scan', m_param1D, m_param2D)
if __name__ == '__main__':
ds1 = test1()
ds2 = test2()
ds3 = test3()
ds4 = test4()
ds5 = test5()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment