本文整理匯總了Python中ramanTools.RamanSpectrum.nearest方法的典型用法代碼示例。如果您正苦於以下問題:Python RamanSpectrum.nearest方法的具體用法?Python RamanSpectrum.nearest怎麽用?Python RamanSpectrum.nearest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ramanTools.RamanSpectrum
的用法示例。
在下文中一共展示了RamanSpectrum.nearest方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: May21
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import nearest [as 別名]
def May21():
a = RamanSpectrum("/home/chris/Documents/DataWeiss/150521/150521stoic_dots.CSV")
a[:] -= 0.2
n_guess = [
0.05,
0.05,
0.05,
0.1,
0.05,
0.05,
0.05,
0.05,
0.05,
0.05,
1015,
1048,
1075,
1100,
1159,
1169,
1184,
1204,
1221,
1246,
20,
20,
20,
40,
20,
40,
20,
20,
20,
20,
0,
0.0,
]
a.plot(color="k")
print a.nearest(1100)
print a.nearest(1300)
b = fitspectrum(a, (1000, 1260), "xGaussian", n_guess)
print b.params[0]
plot(b.x, b.y, "r")
print len(b.x)
print len(b.peaks)
# plot(b.x,b.peaks[0])
for p in b.peaks:
plot(b.x, p, "b")
# pass
b = (RamanSpectrum("/home/chris/Documents/DataWeiss/150520/150520_02.txt") - 500) / 10000
b.plot()
return 0