24小时热门版块排行榜    

CyRhmU.jpeg
查看: 866  |  回复: 1

海湾

铜虫 (初入文坛)

[交流] 【求助】求助“ATK I-V特征曲线”已有1人参与

脚本文件
#make list of relevant temperatures
temperature_list=numpy.linspace(0,2000,21)*Kelvin
#make list of relevant gate voltages
voltage_list=numpy.linspace(0.0,2.0,9)*Volt
#make list to hold the current calculations
current_list=numpy.zeros(len(voltage_list)*len(temperature_list))
current_list=current_list.reshape(len(voltage_list),len(temperature_list))
#specify the filename for the netcdf data file
filename="ivscan-6-6.nc"
#loop through the gate voltages
for n in range(len(voltage_list)):
transmission_spectrum=nlread(filename, object_id="trans"+str(voltage_list[n]))[0]
#loop through the temperature list
for i in range(len(temperature_list)):
current_list[n,i]=transmission_spectrum.current(
electrode_temperatures=(temperature_list,temperature_list))
#plot the current as function of voltage
import pylab
pylab.figure()
# make curve for each temperature
for i in range(len(temperature_list)):
pylab.plot(voltage_list,current_list[:,i])
pylab.xlabel("Bias (V)"
pylab.ylabel("Current (A)"
pylab.show()
上述脚本文件运行后出错信息如下:
Atomistix ToolKit 10.8.0                                                     |
|                                                                              |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
  File "c:\docume~1\medea~1.pc-\locals~1\temp\9711722844208417.py", line 14, in
    transmission_spectrum=nlread(filename, object_id="trans"+str(voltage_list[n]))[0]
IndexError: list index out of range
NanoLanguageScript execution failure
+------------------------------------------------------------------------------+
| NanoLanguageScript execution finished                                        |
+------------------------------------------------------------------------------+
谁能帮忙说明一下原因,应该怎么修改?
回复此楼
海风轻轻吹
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

斯乌苏苏苏

新虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
我也有这个问题…

发自小木虫Android客户端
2楼2019-05-07 18:20:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 海湾 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见