forked from benschneider/Generic-Sweepscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdummydriver.py
More file actions
30 lines (23 loc) · 807 Bytes
/
Copy pathdummydriver.py
File metadata and controls
30 lines (23 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from time import sleep
import numpy as np
class instrument():
"""This dummy has no comment. Test of forking on github"""
def __init__(self, adress='dummy' , name = 'D', start = 0, stop = 0, pt = 1, sstep = 20e-3, stime = 1e-3):
self.adress = adress
#self.exp_2 = self.instrument_1(adress)
self.var_1 = 0
self.name = name
self.start = start
self.stop = stop
self.pt = pt
self.lin = np.linspace(self.start,self.stop,self.pt)
def instrument_1(self, adress):
return (5,adress)
def set_var1(self, var_1):
sleep(0.01) #sim 10ms delay time
self.var_1 = var_1
print var_1
def get_var1(self):
return self.var_1
def get_random(self):
return (np.random.rand(1)*10-5)*2 #+-10