logger.info(dataFile + "");
logger.info(fameTimes + "");
logger.info(fameNames + "");
// Apply linear/polynomial fit
CombinedRegression fit = new CombinedRegression(5);
fit.setData(Doubles.toArray(fameTimes), Doubles.toArray(fameIndices));
// Add calculated retention index to each mass spectrum
for (int scanNumber : correctedDataFile.getScanNumbers(1)) {
CorrectedSpectrum s = (CorrectedSpectrum) correctedDataFile
.getScan(scanNumber);
s.setRetentionIndex((int) fit.getY(s.getRetentionTime()));
s.setRetentionCorrection(fit, results);
}
}