public IEnumerable <IsotopicEnvelope> GetIsolatedMassesAndCharges(MzSpectrum precursorSpectrum, int minAssumedChargeState, int maxAssumedChargeState, double deconvolutionTolerancePpm, double intensityRatio) { if (IsolationRange == null) { yield break; } foreach (var haha in precursorSpectrum.Deconvolute(new MzRange(IsolationRange.Minimum - 8.5, IsolationRange.Maximum + 8.5), minAssumedChargeState, maxAssumedChargeState, deconvolutionTolerancePpm, intensityRatio) .Where(b => b.peaks.Any(cc => isolationRange.Contains(cc.mz)))) { yield return(haha); } }
public IEnumerable <Tuple <List <IMzPeak>, int> > GetIsolatedMassesAndCharges(IMzSpectrum <IMzPeak> precursorSpectrum, int maxAssumedChargeState, Tolerance massTolerance, double intensityRatio) { if (IsolationRange == null) { yield break; } foreach (var haha in precursorSpectrum.Deconvolute(new MzRange(IsolationRange.Minimum - 8.5, IsolationRange.Maximum + 8.5), maxAssumedChargeState, massTolerance, intensityRatio) .Where(b => b.Item1.Any(cc => isolationRange.Contains(cc.Mz)))) { yield return(haha); } }