Skip to content

Commit

Permalink
language/scan: add missing attributes to RandomScan
Browse files Browse the repository at this point in the history
Reported by Joe
sbourdeauducq committed Oct 11, 2015
1 parent 3768c87 commit cd3b590
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artiq/language/scan.py
Original file line number Diff line number Diff line change
@@ -79,6 +79,9 @@ class RandomScan(ScanObject):
"""A scan object that yields a fixed number of randomly ordered evenly
spaced values in a range."""
def __init__(self, min, max, npoints, seed=0):
self.min = min
self.max = max
self.npoints = npoints
self.sequence = list(LinearScan(min, max, npoints))
shuffle(self.sequence, Random(seed).random)

0 comments on commit cd3b590

Please sign in to comment.