本文整理匯總了Python中ramanTools.RamanSpectrum.name方法的典型用法代碼示例。如果您正苦於以下問題:Python RamanSpectrum.name方法的具體用法?Python RamanSpectrum.name怎麽用?Python RamanSpectrum.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ramanTools.RamanSpectrum
的用法示例。
在下文中一共展示了RamanSpectrum.name方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Oct17NMRfitting
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import name [as 別名]
def Oct17NMRfitting():
# a = loadtxt('/home/chris/Dropbox/DataWeiss/151020/MPAexchange on HCN_1000eq.csv',skiprows = 1, usecols = (0,1), delimiter = ',', unpack = True)
# `r = RamanSpectrum(pandas.Series(a[1],a[0]))
# w=1E-5
# g = [0.05,0.03,0.05,.03,.1,.03,.05,.03,.05,1.38,1.39,1.395,1.405,1.41,1.42,1.425,1.43,1.44,w,w,w,w,w,w,w,w,w,0,0]
# s = fitspectrum(r,(1.34,1.46), 'xGaussian', g)
# clf()
# r.plot()
# for i in s.peaks: plot(s.x,i)
# plot(s.x,s.y)
# print s.areas
# xlim(1.34,1.49)
# ylim(-0.01,0.1)
# a = loadtxt('/home/chris/Dropbox/DataWeiss/151020/MPAexchange on HCN_100eq.csv',skiprows = 1, usecols = (0,1), delimiter = ',', unpack = True)
# r = RamanSpectrum(pandas.Series(a[1],a[0]))
# r.name = ''
# w=1E-5
# a = 0.04
# g = [a,a,a,a,a,a,a,a,a,a,a,1.38,1.385,1.392,1.398,1.405,1.41,1.412,1.42,1.43,1.435,1.44,w,w,w,w,w,w,w,w,w,w,w,0,0]
# # s = fitspectrum(r,(1.34,1.46), 'xGaussian', g)
#
# r.plot()
# for i in s.peaks: plot(s.x,i)
# plot(s.x,s.y)
# print s.areas
# xlim(1.34,1.49)
# ylim(-0.01,0.1)
a = loadtxt('/home/chris/Dropbox/DataWeiss/151020/MPAexchange on HCN_100eq.csv',skiprows = 1, usecols = (0,1), delimiter = ',', unpack = True)
r = RamanSpectrum(pandas.Series(a[1],a[0]))
r.name = ''
w=1E-5
a = 0.04
g = [a,0.05,a,a,a,a,a,a,a,a,a,1.725,1.73,1.738,1.743,1.745,1.75,1.755,1.765,1.77,1.78,1.785,w,w,w,w,w,w,w,w,w,w,w,0,0]
s = fitspectrum(r,(1.70,1.80), 'xGaussian', g)
clf()
r.plot()
for i in s.peaks: plot(s.x,i)
plot(s.x,s.y)
print s.params[0]
xlim(1.70,1.80)
ylim(-0.01,0.1)
return s.areas