for (int scanNumber : scanNumbers) {
if (isCanceled())
return;
// Get next MS/MS scan
Scan scan = dataFile.getScan(scanNumber);
// no parents scan for this msms scan
if (scan.getParentScanNumber() <= 0) {
continue;
}
// Get the MS Scan
Scan bestScan = null;
Range rtWindow = new Range(scan.getRetentionTime()
- (binTime / 2.0f), scan.getRetentionTime()
+ (binTime / 2.0f));
Range mzWindow = new Range(
scan.getPrecursorMZ() - (binSize / 2.0f),
scan.getPrecursorMZ() + (binSize / 2.0f));
DataPoint point;
DataPoint maxPoint = null;
int[] regionScanNumbers = dataFile.getScanNumbers(1, rtWindow);
for (int regionScanNumber : regionScanNumbers) {
Scan regionScan = dataFile.getScan(regionScanNumber);
point = ScanUtils.findBasePeak(regionScan, mzWindow);
// no datapoint found
if (point == null) {
continue;
}