若手研究会@越後湯沢
物性研の石井君達が主催で若手研究会が越後湯沢でありました。発表と温泉と懇親会をみんな楽しんでいた様子で大成功でした。来年もやるそう。
import pyvisa
import matplotlib.pyplot as plt
rm = pyvisa.ResourceManager()
rm.list_resources()
usb0=rm.list_resources()
VISAAddr = usb0[0]
scope = rm.open_resource(VISAAddr)
scope.write('waveform:SOUR CHAN1')
data = scope.query_binary_values('waveform:data?' , datatype='s')
xIncrement = float(scope.query('waveform:xincrement?'))
xOrigin = float(scope.query('waveform:xorigin?'))
XREFerence = float(scope.query('waveform:XREFerence?'))
yIncrement = float(scope.query('waveform:yincrement?'))
yOrigin = float(scope.query('waveform:yorigin?'))
YREFerence = float(scope.query('waveform:YREFerence?'))
length = len(data)
time = []
wfm = []
for t in range(length):
time.append((t - XREFerence) * xIncrement + xOrigin)
for d in data:
wfm.append((d - YREFerence) * yIncrement + yOrigin)
plt.plot(time, wfm)
plt.xlabel('Time (sec)')
plt.ylabel('voltage(V)')
plt.show()
コメント
コメントを投稿