mirror of https://github.com/m-labs/artiq.git
language/scan: add missing attributes to RandomScan
Reported by Joe
This commit is contained in:
parent
3768c87bed
commit
cd3b590962
|
@ -79,6 +79,9 @@ class RandomScan(ScanObject):
|
||||||
"""A scan object that yields a fixed number of randomly ordered evenly
|
"""A scan object that yields a fixed number of randomly ordered evenly
|
||||||
spaced values in a range."""
|
spaced values in a range."""
|
||||||
def __init__(self, min, max, npoints, seed=0):
|
def __init__(self, min, max, npoints, seed=0):
|
||||||
|
self.min = min
|
||||||
|
self.max = max
|
||||||
|
self.npoints = npoints
|
||||||
self.sequence = list(LinearScan(min, max, npoints))
|
self.sequence = list(LinearScan(min, max, npoints))
|
||||||
shuffle(self.sequence, Random(seed).random)
|
shuffle(self.sequence, Random(seed).random)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue