コード例 #1
0
ファイル: MsDataScan.cs プロジェクト: smith-chem-wisc/mzLib
        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];
        }
コード例 #2
0
ファイル: MsDataScan.cs プロジェクト: bintiibrahim/mzLib
        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];
        }
コード例 #3
0
ファイル: MsDataScan.cs プロジェクト: smith-chem-wisc/mzLib
        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];
        }