有没有办法将光谱数据文件*.sp从FL Winlab Perkin Elmer打开到R

问题描述 投票:0回答:1

我使用 FL winlab 软件(该设备的经典 Perkin Elmer 供应商软件)在 PerkinElmer LS-50B 上收集 3D 激发发射光谱。 对于这种模式,该软件显然只允许保存 *.sp 文件(特定于 Perkin Elmer)并为每个激励增量保存一个文件。 我想知道是否可以在 R 中打开 sp 文件来分析数据。

目前,我使用 SpectraGryph 1.2 处理数据以将其转换为 csv 文件。这很好,但需要一些重复且耗时的步骤。因为我生成了大量数据,所以我正在寻找一种自动解决方案来加快处理速度。 我尝试了以下步骤:

#choose a sp file
f <- file.choose() 
# try to open it
df <- scan(f,skip=3)   

我明白了

Error in read.table(f, skip = 3) : no lines available in input
In addition: Warning messages:
1: In readLines(file, skip) : line 1 appears to contain an embedded nul
2: In readLines(file, skip) : line 2 appears to contain an embedded nul
3: In readLines(file, skip) :
  incomplete final line found on 'C:\Users\...\DY02_25032021#05.sp'    
r spectrum
1个回答
0
投票

一些同事(Stefan Seeger 和 Elena Fernandez Pascual)找到了如何从 sp 文件中获取数据。执行此操作的脚本位于我的 github 页面,并在同一 github 页面中有一个实际示例 - 鲍里斯·德罗兹

© www.soinside.com 2019 - 2024. All rights reserved.