.getIntensity(), ip2.getHighestIsotope().getIntensity());
final double noiseIntensity = parameters.getParameter(
IsotopePatternScoreParameters.isotopeNoiseLevel).getValue();
// Normalize the isotopes to intensity 0..1
IsotopePattern nip1 = IsotopePatternCalculator
.normalizeIsotopePattern(ip1);
IsotopePattern nip2 = IsotopePatternCalculator
.normalizeIsotopePattern(ip2);
// Merge the data points from both isotope patterns into a single array.
// Data points from first pattern will have positive intensities, data
// points from second pattern will have negative intensities.
ArrayList<DataPoint> mergedDataPoints = new ArrayList<DataPoint>();
for (DataPoint dp : nip1.getDataPoints()) {
if (dp.getIntensity() * patternIntensity < noiseIntensity)
continue;
mergedDataPoints.add(dp);
}
for (DataPoint dp : nip2.getDataPoints()) {
if (dp.getIntensity() * patternIntensity < noiseIntensity)
continue;
DataPoint negativeDP = new SimpleDataPoint(dp.getMZ(),
dp.getIntensity() * -1);
mergedDataPoints.add(negativeDP);