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: 728aff71aef2
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: 1c8202e2072c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 11, 2016

  1. lda: fix windows path

    jordens committed Aug 11, 2016
    Copy the full SHA
    586f071 View commit details
  2. Copy the full SHA
    1c8202e View commit details
Showing with 10 additions and 8 deletions.
  1. +1 −1 artiq/devices/lda/driver.py
  2. +9 −7 artiq/gui/ticker.py
2 changes: 1 addition & 1 deletion artiq/devices/lda/driver.py
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ class Lda:
or by installing the libhidapi-libusb0 binary package on Debian-like OS.
On Windows you should put hidapi.dll shared library in the
artiq\/devices\/lda folder.
artiq\\\\devices\\\\lda folder.
"""
_vendor_id = 0x041f
16 changes: 9 additions & 7 deletions artiq/gui/ticker.py
Original file line number Diff line number Diff line change
@@ -96,13 +96,15 @@ def compact_exponential(self, v):
"""
# this is after the matplotlib ScalarFormatter
# without any i18n
significand, exponent = "{:1.10e}".format(v).split("e")
significand = significand.rstrip("0").rstrip(".")
exponent_sign = exponent[0].replace("+", "")
v = "{:.15e}".format(v)
if "e" not in v:
return v # short number, inf, NaN, -inf
mantissa, exponent = v.split("e")
mantissa = mantissa.rstrip("0").rstrip(".")
exponent_sign = exponent[0].lstrip("+")
exponent = exponent[1:].lstrip("0")
s = "{:s}e{:s}{:s}".format(significand, exponent_sign,
exponent).rstrip("e")
return self.fix_minus(s)
return "{:s}e{:s}{:s}".format(mantissa, exponent_sign,
exponent).rstrip("e")

def prefix(self, offset, magnitude):
"""
@@ -115,7 +117,7 @@ def prefix(self, offset, magnitude):
prefix += self.compact_exponential(offset) + " + "
if magnitude != 1.:
prefix += self.compact_exponential(magnitude) + " × "
return prefix
return self.fix_minus(prefix)

def __call__(self, a, b):
"""