Modified msp parser for data with comments
@@ -78,7 +78,9 @@ public class NistMspParser extends SpectralDBParser {
}
} else {
// data?
- String[] data = l.split(" ");
+ String[] dataAndComment = l.split("\"");
+ for (String dataPair : dataAndComment) {
+ String[] data = dataPair.split(" ");
if (data.length == 2) {
try {
dps.add(new SimpleDataPoint(Double.parseDouble(data[0]),
@@ -88,6 +90,7 @@ public class NistMspParser extends SpectralDBParser {
}
}
}
+ }
} else if (isData) {
// empty row after data
// add entry and reset
