add take_grad
1
3.3.4Полупроводники/.~lock.Data.xlsx#
Normal file
@ -0,0 +1 @@
|
||||
,anna,anna-HP-Laptop-15-bw0xx,14.11.2022 17:37,file:///home/anna/.config/libreoffice/4;
|
Before Width: | Height: | Size: 403 KiB After Width: | Height: | Size: 403 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
@ -183,7 +183,7 @@ def B(x, b, c, d):
|
||||
def make_grad():
|
||||
data = make_dic('grad.csv')
|
||||
f_0 = 0.1
|
||||
f = data['Ф']-f_0
|
||||
f = data['F']-f_0
|
||||
s = 75 * 10 ** -4
|
||||
b = f * 10**-3 / s
|
||||
x = data['I']
|
||||
|
@ -1,4 +1,4 @@
|
||||
Ô;I
|
||||
F;I
|
||||
6;1.51
|
||||
6.1;1.46
|
||||
5.8;1.3
|
||||
|
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
@ -36,7 +36,7 @@ class ChartWindow(AbstractWindow):
|
||||
|
||||
(a, eps) = self.make_grad()
|
||||
print(*a)
|
||||
self.make_main(a, eps)
|
||||
# self.make_main(a, eps)
|
||||
|
||||
|
||||
self.setWindowTitle('Основной эксперимент. Обработка данных')
|
||||
@ -69,7 +69,9 @@ class ChartWindow(AbstractWindow):
|
||||
return x**2*b+x*c+d
|
||||
|
||||
def make_grad(self):
|
||||
|
||||
|
||||
self.parent.flow_dataname = 'Induction_data.csv'
|
||||
self.parent.grad_chartname = 'Graduation_chart.png'
|
||||
self.parent.data_grad = Data(data_filename=os.path.join(
|
||||
self.parent.folder, self.parent.flow_dataname))
|
||||
|
@ -103,9 +103,6 @@ class GraduationWindow(AbstractWindow):
|
||||
def take_data(self):
|
||||
t = (round(time.time()*1000)-self.start_time)
|
||||
b = self.lineEdit.text()
|
||||
msg = 'VOLTage '+str(self.volt)+'\n'
|
||||
self.parent.ser.write(msg.encode('ascii'))
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
f_amp = open(self.parent.I_M_name, 'w')
|
||||
@ -114,7 +111,7 @@ class GraduationWindow(AbstractWindow):
|
||||
f_amp = open(self.parent.I_M_name, 'r')
|
||||
I_M = '{:.9f}'.format(float(f_amp.read(15))*10**3)
|
||||
f_amp.close()
|
||||
self.save_data([b, self.volt, I_M, t])
|
||||
self.save_data([b, 0, I_M, t])
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.parent.close()
|
@ -32,7 +32,12 @@ class Start:
|
||||
self.app = QApplication.instance()
|
||||
self.current=0
|
||||
self.window = StartWindow(self)
|
||||
self.add_equip()
|
||||
|
||||
|
||||
l = 'usbtmc'+str(1)
|
||||
self.I_M_name = os.path.join('/dev', l)
|
||||
# self.add_equip()
|
||||
|
||||
|
||||
self.draw()
|
||||
self.app.exec()
|
||||
@ -143,8 +148,8 @@ class StartWindow(AbstractWindow):
|
||||
|
||||
self.chart = QPushButton('Обработка данных')
|
||||
self.chart.clicked.connect(self.chart_click)
|
||||
if not self.parent.current==4:
|
||||
self.chart.setEnabled(False)
|
||||
# if not self.parent.current==4:
|
||||
# self.chart.setEnabled(False)
|
||||
self.chart_text = QLabel('Выполняется расчет всех констант образца и построение графиков', self)
|
||||
|
||||
self.main = QPushButton('Определение ЭДС Холла')
|
||||
|
BIN
Automation/take_grad/Graduation_chart.png
Normal file
After Width: | Height: | Size: 147 KiB |
34
Automation/take_grad/Induction_data.csv
Normal file
@ -0,0 +1,34 @@
|
||||
"B,mTl","E,mV","I_M,mA","t,ms"
|
||||
9.0,0,-0.017355649,4064
|
||||
4.8,0,9.062551030,26903
|
||||
14.4,0,35.657554500,50196
|
||||
30.5,0,56.164741900,72561
|
||||
47.5,0,77.052805300,127690
|
||||
66.5,0,101.500865000,150179
|
||||
81.9,0,121.485461000,166439
|
||||
92.5,0,135.858421000,191578
|
||||
111.0,0,162.262180000,215469
|
||||
143.8,0,219.841182000,236841
|
||||
188.1,0,294.176851000,256229
|
||||
246.3,0,370.369039000,293209
|
||||
280.0,0,415.483465000,311272
|
||||
330.1,0,482.875030000,330588
|
||||
382.6,0,555.197100000,354245
|
||||
431.2,0,623.840762000,371740
|
||||
468.1,0,677.716870000,388144
|
||||
505.6,0,734.378744000,407822
|
||||
542.4,0,792.846872000,437482
|
||||
574.2,0,847.660556000,455654
|
||||
595.2,0,886.906901000,477120
|
||||
623.1,0,943.877306000,496339
|
||||
655.2,0,1019.979630000,517558
|
||||
668.5,0,1055.418760000,534419
|
||||
681.3,0,1091.280250000,553488
|
||||
693.7,0,1129.253530000,576919
|
||||
701.8,0,1161.173020000,596092
|
||||
715.6,0,1203.603520000,613596
|
||||
720.9,0,1224.850230000,634934
|
||||
727.6,0,1254.154680000,647760
|
||||
739.2,0,1300.575130000,694432
|
||||
759.0,0,1346.860770000,726900
|
||||
770.8,0,1404.025880000,759661
|
|
2
Automation/try/Induction_data.csv
Normal file
@ -0,0 +1,2 @@
|
||||
"B,mTl","E,mV","I_M,mA","t,ms"
|
||||
3,0,-0.000180328,884
|
|