Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature AWG - Tabor - Reworked implementation of the repetition modes #602

Open
wants to merge 110 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
28788c5
Start der Implementierung der AWG-Treiber
bpapajewski Nov 4, 2019
6995a96
Test push
bpapajewski Nov 5, 2019
228a55a
Anfang der Umsetzung der Feature Strucktur
bpapajewski Nov 22, 2019
b897c67
Erster Ansatz der Feature Strucktur fuers Device umgesetzt
bpapajewski Dec 6, 2019
8932529
Erster Fertiger Entwurf - vor dem Testen
bpapajewski Dec 9, 2019
25f35d8
Erste Verbesserungen eingebaut
bpapajewski Jan 14, 2020
a6c219f
Abstrakte Property ueberarbeitet
bpapajewski Jan 14, 2020
910d7c0
Finished AWG Driver
bpapajewski Jan 17, 2020
f212155
Rename hardware/awgs/base.py to old_base.py
lankes-fzj Jan 17, 2020
7e828de
Rename AWGDriver.py to base.py
lankes-fzj Jan 17, 2020
e0cde11
Update tabor.py
lankes-fzj Jan 17, 2020
2776a4c
Update tektronix.py
lankes-fzj Jan 17, 2020
1f8f77a
Minor bug fixes
lankes-fzj Jan 17, 2020
4f7c259
Added a test script for the base drivers
lankes-fzj Jan 17, 2020
c219b62
Change of the feature-logic
bpapajewski Jan 27, 2020
4324626
Unittests added
bpapajewski Jan 28, 2020
5bb3997
Fixed Problem with CI
bpapajewski Jan 28, 2020
64a9d68
Start of the implementation of the tabor drivers
bpapajewski Feb 5, 2020
c9de729
Start of the implementation of the Tabor driver
bpapajewski Feb 6, 2020
a2587fa
Start der Implementierung der AWG-Treiber
bpapajewski Nov 4, 2019
9c5f634
Test push
bpapajewski Nov 5, 2019
83e7a8a
Anfang der Umsetzung der Feature Strucktur
bpapajewski Nov 22, 2019
c27ce1b
Erster Fertiger Entwurf - vor dem Testen
bpapajewski Dec 9, 2019
4f8a9a2
Erste Verbesserungen eingebaut
bpapajewski Jan 14, 2020
74db239
Abstrakte Property ueberarbeitet
bpapajewski Jan 14, 2020
4af016b
Finished AWG Driver
bpapajewski Jan 17, 2020
36fdc8d
Rename hardware/awgs/base.py to old_base.py
lankes-fzj Jan 17, 2020
979005e
Rename AWGDriver.py to base.py
lankes-fzj Jan 17, 2020
70700c3
Update tabor.py
lankes-fzj Jan 17, 2020
5a0a15b
Minor bug fixes
lankes-fzj Jan 17, 2020
329b035
Added a test script for the base drivers
lankes-fzj Jan 17, 2020
e9f4ccb
Change of the feature-logic
bpapajewski Jan 27, 2020
123d31e
Unittests added
bpapajewski Jan 28, 2020
e72b24f
Removed 'Base' form the names of the classes
bpapajewski Feb 5, 2020
12dd7d6
Renamed BaseAWGChannel to AWGChannel and AWG to AWGDevice to avoid co…
lankes-fzj Feb 5, 2020
f80e25f
Some improvements for the feature logic
lankes-fzj Feb 5, 2020
b8ecc0a
Removed type hint in awg_base_test
lankes-fzj Feb 5, 2020
086a3b3
Removed type hint in awg_base_test
lankes-fzj Feb 5, 2020
3a0fbf0
Removed f-strings to keep compatibility to Python 3.5
lankes-fzj Feb 5, 2020
8547b96
Using qupulse.utils.types.Collection instead of typing.Collection to …
lankes-fzj Feb 5, 2020
7833c50
Using qupulse.utils.types.Collection instead of typing.Collection to …
lankes-fzj Feb 5, 2020
a1c5f3a
Replaced imports of awgs.base with awgs.old_base
lankes-fzj Feb 6, 2020
9a445f1
Basic communication works - but Tabor driver not yet completely rewri…
Feb 19, 2020
22a9473
simulator based unit tests run without a problem
Mar 4, 2020
20fbc61
simulator based unit tests run, but in the last UNIT-Test a Exception…
Mar 5, 2020
24fc13a
simulator based unit tests run, but in the last UNIT-Test a Exception…
Mar 5, 2020
507d60a
removed a few old comments
Mar 5, 2020
08ca68e
added new comments
Mar 6, 2020
bd0f2e6
channel tuple adapter was added
Mar 10, 2020
9729d07
channel tuple adapter - a bug was fixed
Mar 10, 2020
fd6d426
channel tuple adapter - consturctor was changed
Mar 10, 2020
921abe2
channel tuple adapter - consturctor was changed
Mar 10, 2020
042e423
start of implementing the feedback
Mar 23, 2020
d5a1d8d
Rebase conflicts finished - with buggs left
Mar 24, 2020
07da7bb
Compared with lukas merged branch
Mar 25, 2020
4e72b79
old simulator based tests runs, but throws asserations fail
Mar 25, 2020
69030b1
a few bugs from the rebase are fixed
Mar 25, 2020
560d4d3
a few bugs from the rebase are fixed
Mar 25, 2020
e8d0fe8
UNIT-tests run without exceptions again after the rebase
Mar 26, 2020
7831e1f
Synchronisation feature and DeviceControl feature were added
Apr 1, 2020
224147f
More methods in ProgramManagement, but not all Unit Tests run
Apr 2, 2020
233a905
Unit tests run fine, but TaborProgramManagement needs some work
Apr 2, 2020
ef1db88
Unit tests run fine, but TaborProgramManagement needs some work
Apr 6, 2020
130e36c
Weakrefs added for Channels, ChannelTuple and features
Apr 8, 2020
eaf6e4e
Changed the loop in the synchronisation feature
Apr 15, 2020
de0378d
Changed samplerate property to TimeType
Apr 15, 2020
d9cfd1d
TaborProgramManagement - upload Method fixed
Apr 22, 2020
5c4e6c3
Added a few docstrings
Apr 22, 2020
30bdd8e
Worked on some docstrings
Apr 23, 2020
affc17a
-removed the setter for amplitude and offset
May 19, 2020
5016b3b
SCPI-Feature generalization implemented
May 26, 2020
303cfcb
Changed run_current_programm to work with coupling
Jun 4, 2020
76207cf
Beginning of the ContinuousRunMode Feature
Jun 25, 2020
24bb364
continued work on the ContinuousRunMode Feature
Aug 27, 2020
647a26a
-fixes from tests with device ("once" still not working)
Aug 28, 2020
60762ad
-small fixes
Aug 28, 2020
33e6580
marker_channls is now the name for the consistently
Aug 28, 2020
f9c5d97
first test of run_current_program for a coupled device
Aug 28, 2020
ccd737d
fixed __init__ of the tabor program
Nov 20, 2020
73b138c
-moved _send_cmd into the SCPI feature of a device
Dec 2, 2020
8ba3b3e
the getitem of a feature can now also be used with a string
Dec 2, 2020
d2ea69e
-removed support once repetition mode in the method upload and run_cu…
Dec 9, 2020
d525c8e
Moved the tabor driver with the new logic into their own package "awg…
Dec 17, 2020
c21b4b0
added an __init__.py for awgs_new_driver
Dec 17, 2020
bbfd7c5
renamed all the tests to tabor_new_... so they don't overwrite the te…
Jan 14, 2021
37a49ac
fixed the tabor drivers because the read_waveform method isn't subscr…
Jan 14, 2021
6abbe27
Merge remote-tracking branch 'remotes/upstream/master' into feat/new-…
Jan 14, 2021
1a1f041
added tests for the new_tabor_driver
Feb 1, 2021
1ac3038
Delete tabor_simulator_based_test_debug.py
bpapajewski Feb 3, 2021
2aeffb6
-added a comment for the method _is_coupled of a device
Feb 3, 2021
931ee76
removed old comment from the method _enter_config_mode of a channel t…
Feb 3, 2021
dff82b4
added the implenetation for the method enabled for a channel and a ma…
Feb 3, 2021
fc56b90
added MATLAB/+qc/personalPaths.mat and /doc/source/_autosummary/* to …
Feb 18, 2021
ed07872
fixed the gitignore
Feb 22, 2021
3944901
renamed to tabor_new_driver package to feature_awg
Feb 22, 2021
4de30b3
removed silencing of all warnings in awg_new_driver_base_tests.py
Feb 22, 2021
7107da8
reformated tabor_test.py to minimize merge conflicts
Feb 25, 2021
1b06544
reformated tabor_test.py to minimize merge conflicts
Mar 1, 2021
a3d40a3
implemented missing methods in awg_new_driver_base_tests.py
Mar 2, 2021
09396a1
fixed refactoring mistake in setup.py
Mar 2, 2021
755fe33
Merge branch 'master' of https://github.com/qutech/qupulse into feat/…
Apr 13, 2021
1df3c4a
fixed SyntaxWarning from issue #561
Apr 16, 2021
c684f9c
first changes for the runmode once
Apr 26, 2021
203a34f
-first draft of the runmode auto rearm
Jun 1, 2021
1381df0
tried to fix the test
Jun 1, 2021
60d7db7
revise repetition mode check in set_repetition_mode and run_current_p…
Jun 11, 2021
5c85c91
fixed a problem with weakref for the channel tuple
Jun 11, 2021
9b741a5
changed the static DummyProgramm to a class so it can have attributes
Jun 11, 2021
f3bfee4
commented the todos
Jun 11, 2021
bd8c2d1
Merge remote-tracking branch 'origin/feat/new-tabor-driver-rebase' in…
Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/examples/hardware/tabor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from qupulse.hardware.setup import HardwareSetup, PlaybackChannel, MarkerChannel
from qupulse.hardware.awgs.tabor import TaborChannelPair, TaborAWGRepresentation
from qupulse.hardware.awgs.tabor import TaborAWGRepresentation
import pyvisa


Expand Down
1 change: 1 addition & 0 deletions qupulse/_program/seqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from qupulse.utils import replace_multiple, grouper
from qupulse._program.waveforms import Waveform
from qupulse._program._loop import Loop

from qupulse._program.volatile import VolatileRepetitionCount, VolatileProperty
from qupulse.hardware.awgs.base import ProgramEntry

Expand Down
5 changes: 3 additions & 2 deletions qupulse/_program/tabor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np

from qupulse.hardware.feature_awg.features import RepetitionMode
from qupulse.utils.types import ChannelID, TimeType
from qupulse.hardware.awgs.base import ProgramEntry
from qupulse.hardware.util import get_sample_times, voltage_to_uint16
Expand Down Expand Up @@ -389,7 +390,7 @@ def __init__(self,
voltage_transformations: Tuple[Optional[callable], Optional[callable]],
sample_rate: TimeType,
mode: TaborSequencing = None,
repetition_mode: str = "infinite",
repetition_mode: Union[str, RepetitionMode] = "infinite",
):
if len(channels) != device_properties['chan_per_part']:
raise TaborException('TaborProgram only supports {} channels'.format(device_properties['chan_per_part']))
Expand Down Expand Up @@ -420,7 +421,7 @@ def __init__(self,
self._parsed_program = None # type: Optional[ParsedProgram]
self._mode = None
self._device_properties = device_properties
self._repetition_mode = repetition_mode
self._repetition_mode = RepetitionMode(repetition_mode)

assert mode in (TaborSequencing.ADVANCED, TaborSequencing.SINGLE), "Invalid mode"
if mode == TaborSequencing.SINGLE:
Expand Down
2 changes: 1 addition & 1 deletion qupulse/hardware/awgs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__all__ = ["install_requirements"]

try:
from qupulse.hardware.awgs.tabor import TaborAWGRepresentation, TaborChannelPair
from qupulse.hardware.feature_awg.tabor import TaborDevice, TaborChannelTuple
__all__.extend(["TaborAWGRepresentation", "TaborChannelPair"])
except ImportError:
pass
Expand Down
8 changes: 5 additions & 3 deletions qupulse/hardware/feature_awg/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import Optional, Collection
from typing import Optional, Collection, Union
import weakref

from qupulse.hardware.awgs.base import AWG
Expand All @@ -11,14 +11,16 @@

class AWGDeviceFeature(Feature):
"""Base class for features that are used for `AWGDevice`s"""
def __init__(self):
def __init__(self, device: 'AWGDevice'):
super().__init__(AWGDevice)
self._device = weakref.proxy(device)


class AWGChannelFeature(Feature):
"""Base class for features that are used for `AWGChannel`s"""
def __init__(self):
def __init__(self, channel: Union['AWGChannel', 'AWGMarkerChannel']):
super().__init__(_BaseAWGChannel)
self._channel = weakref.proxy(channel)


class AWGChannelTupleFeature(Feature):
Expand Down
8 changes: 4 additions & 4 deletions qupulse/hardware/feature_awg/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from enum import Enum

from qupulse._program._loop import Loop
from qupulse.hardware.feature_awg.base import AWGDeviceFeature, AWGChannelFeature, AWGChannelTupleFeature,\
AWGChannelTuple
from qupulse.hardware.feature_awg.base import AWGDeviceFeature, AWGChannelFeature, AWGChannelTupleFeature, \
AWGChannelTuple, AWGDevice
from qupulse.utils.types import ChannelID

try:
Expand All @@ -24,8 +24,8 @@ class SCPI(AWGDeviceFeature, ABC):
https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments
"""

def __init__(self, visa: 'pyvisa.resources.MessageBasedResource'):
super().__init__()
def __init__(self, device: 'AWGDevice', visa: 'pyvisa.resources.MessageBasedResource'):
super().__init__(device)
self._socket = visa

def send_cmd(self, cmd_str):
Expand Down
Loading