// Canceled?
if (isCanceled())
return;
// Get the current spectrum
Scan spectrum = dataFile.getScan(scanNumber);
// Produce List of ion masses in the current spectrum
// IMPORTANT: We assume the truncating the double-valued ion masses
// will
// since the deconvoluted data only gives integral values
List<Integer> spectraMasses = new ArrayList<Integer>();
for (DataPoint p : spectrum.getDataPoints())
spectraMasses.add((int) p.getMZ());
// Find candidate masses by iterating over all possible mass values
// up to m/z = 1000
for (int i = 1; i <= 1000; i++) {