本文整理匯總了Python中ramanTools.RamanSpectrum.to_csv方法的典型用法代碼示例。如果您正苦於以下問題:Python RamanSpectrum.to_csv方法的具體用法?Python RamanSpectrum.to_csv怎麽用?Python RamanSpectrum.to_csv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ramanTools.RamanSpectrum
的用法示例。
在下文中一共展示了RamanSpectrum.to_csv方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: today
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import to_csv [as 別名]
def today():
a = "/home/chris/Documents/DataWeiss/150518/"
for i in range(1, 9):
r = RamanSpectrum(a + "150517_0" + str(i) + ".txt")
v = 10 ** 7 / array(r.index) - 10 ** 7 / 785
r = RamanSpectrum(pandas.Series(r.values, -1 * v))
r.to_csv(a + "150518_0" + str(i) + "b.txt")
return 0
示例2: June22
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import to_csv [as 別名]
def June22():
"""Nice spectra of CdOPA and dotsOPA"""
d = RamanSpectrum('/home/chris/Dropbox/DataWeiss/150622/150622_06.txt') ### pH 1
a = RamanSpectrum('/home/chris/Dropbox/DataWeiss/150622/150622_07.txt') ### pH 5
b = RamanSpectrum('/home/chris/Dropbox/DataWeiss/150622/150622_08.txt') ### pH 12
c= RamanSpectrum('/home/chris/Dropbox/DataWeiss/150612/150612_01_CdSe.txt') ## dots
d.autobaseline((283,1989),order = 3)
d.autobaseline((284,408,577,701,826,1147,1380,1588,1849,1976),join='start',order = 9,specialoption='points')
a.autobaseline((283,1989),order = 3)
a.autobaseline((284,577,701,826,1147,1380,1588,1849,1976),join='start',order = 9,specialoption='points')
b.autobaseline((283,1989),order = 3)
b.autobaseline((284,577,701,826,1147,1380,1588,1849,1976),join='start',order = 9,specialoption='points')
c= RamanSpectrum('/home/chris/Dropbox/DataWeiss/150612/150612_01_CdSe.txt') ## dots
c.autobaseline((911,1196,1385,1515,1800),specialoption='points',order=7,join='start')
c.autobaseline((280,600,690,826,861,911),specialoption='points', order = 5,join='end')
c.autobaseline((281,630), order = 4, join = 'end')
c.autobaseline((1492,1800), order = 5, join = 'start')
c[:]*=3
c[:]+=5000
b[:]+=4000
a[:]+=1300
c.plot()
b.plot()
a.plot()
d.plot()
ylim(0,10000)
xlim(400,1800)
legend(['dots','CdOPA pH12', 'pH 5', 'pH1'])
tosave = transpose([d.index,d.values,a.values,b.values])
savetxt('/home/chris/Desktop/emily/CdOPARaman.csv', tosave, header = 'pH1, pH5, pH12',delimiter = ',')
c.to_csv('/home/chris/Desktop/emily/DotsOPARaman.csv')
ylabel('Intensity (a.u.)')
xlabel('Raman Shift (cm$^{-1}$)')
# savefig('/home/chris/Dropbox/GroupmeetingJuly9_2015/dotsandrefs.png', dpi=256)
return 0