Exemple #1
0
        public void ComputeMonoisotopicPeakIntensity(MzSpectrum precursorSpectrum)
        {
            if (precursorSpectrum.Size == 0)
            {
                throw new MzLibException("Could not compute monoisotopic peak intensity because the precursor scan contains no peaks");
            }
            int thePeak = precursorSpectrum.GetClosestPeakIndex(SelectedIonMonoisotopicGuessMz.Value);

            SelectedIonMonoisotopicGuessIntensity = precursorSpectrum.YArray[thePeak];
            SelectedIonMonoisotopicGuessMz        = precursorSpectrum.XArray[thePeak];
        }
Exemple #2
0
        public void ComputeSelectedPeakIntensity(MzSpectrum precursorSpectrum)
        {
            if (precursorSpectrum.Size == 0)
            {
                throw new MzLibException("Could not compute selected peak intensity because the precursor scan contains no peaks");
            }
            var thePeak = precursorSpectrum.GetClosestPeakIndex(SelectedIonMZ.Value);

            SelectedIonIntensity = precursorSpectrum.YArray[thePeak.Value];
            SelectedIonMZ        = precursorSpectrum.XArray[thePeak.Value];
        }
Exemple #3
0
        public void RefineSelectedMzAndIntensity(MzSpectrum precursorSpectrum)
        {
            if (!IsolationMz.HasValue)
            {
                throw new MzLibException("Could not define precursor ion because the isolation m/z window is undefined in the spectra file");
            }
            if (precursorSpectrum.Size == 0)
            {
                throw new MzLibException("Could not define precursor ion because the precursor scan contains no peaks");
            }
            int thePeak = precursorSpectrum.GetClosestPeakIndex(IsolationMz.Value);

            SelectedIonIntensity = precursorSpectrum.YArray[thePeak];
            SelectedIonMZ        = precursorSpectrum.XArray[thePeak];
        }