Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d38f1e679644
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 284e3ddb2b5e
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 22, 2015

  1. Copy the full SHA
    72616f6 View commit details
  2. Copy the full SHA
    42e87c0 View commit details
  3. Copy the full SHA
    21a28a1 View commit details
  4. Copy the full SHA
    284e3dd View commit details
Showing with 19 additions and 7 deletions.
  1. +3 −4 artiq/gui/explorer.py
  2. +6 −2 artiq/gui/scan.py
  3. +9 −0 artiq/language/environment.py
  4. +1 −1 artiq/protocols/pyon.py
7 changes: 3 additions & 4 deletions artiq/gui/explorer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import traceback

from quamash import QtGui, QtCore
from pyqtgraph import dockarea
@@ -136,12 +135,12 @@ def get_argument_values(self, show_error_message):
for arg, entry in self._args_to_entries.items():
try:
r[arg] = entry.get_argument_value()
except:
except Exception as e:
if show_error_message:
msgbox = QtGui.QMessageBox(self.dialog_parent)
msgbox.setWindowTitle("Error")
msgbox.setText("Failed to obtain value for argument '{}'.\n{}"
.format(arg, traceback.format_exc()))
msgbox.setText("Failed to obtain value for argument '{}':\n{}"
.format(arg, str(e)))
msgbox.setStandardButtons(QtGui.QMessageBox.Ok)
msgbox.show()
return None
8 changes: 6 additions & 2 deletions artiq/gui/scan.py
Original file line number Diff line number Diff line change
@@ -40,9 +40,13 @@ def set_values(self, min, max, npoints):
force_spinbox_value(self.npoints, npoints)

def get_values(self):
min = self.min.value()
max = self.max.value()
if min > max:
raise ValueError("Minimum scan boundary must be less than maximum")
return {
"min": self.min.value(),
"max": self.max.value(),
"min": min,
"max": max,
"npoints": self.npoints.value()
}

9 changes: 9 additions & 0 deletions artiq/language/environment.py
Original file line number Diff line number Diff line change
@@ -133,6 +133,15 @@ def build(self):
raise NotImplementedError

def dbs(self):
"""Returns the device manager, the parameter database and the result
database, in this order.
This is the same order that the constructor takes them, allowing
sub-objects to be created with this idiom to pass the environment
around: ::
sub_object = SomeLibrary(*self.dbs())
"""
return self.__dmgr, self.__pdb, self.__rdb

def get_argument(self, key, processor=None):
2 changes: 1 addition & 1 deletion artiq/protocols/pyon.py
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ def _npscalar(ty, data):


_eval_dict = {
"__builtins__": None,
"__builtins__": {},

"null": None,
"false": False,