【发布时间】:2021-04-20 06:47:57
【问题描述】:
我在 cvs 文件中有一个(油样)光谱作为 2D 数组,我想在波长 600 - 1800 cm-1 中找到峰值。我试过 scipy.signal.find_peaks 但这需要一个一维数组,我有一个二维数组,其中包含波长和相应的峰值。 任何帮助都会受到赞赏,因为我是 python 的初学者
编辑:我还尝试了以下操作:
从检测导入检测峰值
ind = detect_peaks(df)
其中 df 是我的数组的名称(它有两列)并且会弹出一个错误:ValueError: all the input arrays must have the same number of dimensions, but the array at index 0 has 2 dimension(s) and the索引 1 处的数组有 1 个维度
【问题讨论】:
标签: python matlab numpy data-analysis spectra