Beispiel #1
0
        /// <summary>相对保留时间定性方法,单参考峰</summary>
        /// <param name="peak_list">未知样峰对象列表</param>
        /// <param name="std_ref">标样中的参考峰</param>
        /// <param name="measure_ref">未知样中的参考峰</param>
        /// <param name="std_rt">保留时间</param>
        /// <param name="pim">定性参数</param>
        /// <returns>成功匹配的峰对象</returns>
        public Peak IdentifyPeak(List <Peak> peak_list, Peak std_ref, Peak unknown_ref, double std_rt, PeakIdentificationMethod pim)
        {
            if ((std_ref == null) || (unknown_ref == null) || (peak_list == null))
            {
                return(null);
            }

            if (unknown_ref.PeakPoint.X == 0)
            {
                return(null);
            }

            List <Peak> _target_list = new List <Peak>();

            double _band       = CTimeBand.GetTimeBand(std_rt, pim);
            double _delta_time = 0.0;

            foreach (Peak _p in peak_list)
            {
                //if (!FilterPeak(_p)) continue;

                _delta_time = Math.Abs(std_rt - (std_ref.PeakPoint.X / unknown_ref.PeakPoint.X) * _p.PeakPoint.X);

                if (_delta_time <= _band)
                {
                    _target_list.Add(_p);
                }
            }

            return(CPeakSelect.PeakSelect(_target_list, std_rt, pim.PeakSelect_Method));
        }
Beispiel #2
0
        /// <summary>相对保留时间定性方法,多参考峰</summary>
        /// <param name="peak_list">未知样峰对象列表</param>
        /// <param name="std_ref_list">标样中的参考峰列表</param>
        /// <param name="measure_ref_list">未知样中的参考峰列表</param>
        /// <param name="std_rt">保留时间</param>
        /// <param name="pim">定性参数</param>
        /// <returns>成功匹配的峰对象</returns>
        public Peak IdentifyPeak(List <Peak> peak_list, List <Peak> std_ref_list, List <Peak> unknown_ref_list, double std_rt, PeakIdentificationMethod pim)
        {
            if ((peak_list == null) || (std_ref_list == null) || (unknown_ref_list == null))
            {
                return(null);
            }

            if ((std_ref_list.Count != 2) || (unknown_ref_list.Count != 2))
            {
                return(null);
            }

            List <Peak> _target_list = new List <Peak>();

            double _band = CTimeBand.GetTimeBand(std_rt, pim);
            double _corr_rt = 0.0, _delta_time = 0.0;

            foreach (Peak _p in peak_list)
            {
                //if (!FilterPeak(_p)) continue;

                _corr_rt    = ((_p.PeakPoint.X - unknown_ref_list[0].PeakPoint.X) / (unknown_ref_list[1].PeakPoint.X - unknown_ref_list[0].PeakPoint.X)) * (std_ref_list[1].PeakPoint.X - std_ref_list[0].PeakPoint.X) + std_ref_list[0].PeakPoint.X;
                _delta_time = Math.Abs(_corr_rt - std_rt);

                if (_delta_time <= _band)
                {
                    _target_list.Add(_p);
                }
            }

            return(CPeakSelect.PeakSelect(_target_list, std_rt, pim.PeakSelect_Method));
        }
Beispiel #3
0
        /// <summary>绝对保留时间定性方法</summary>
        /// <param name="peakList">未知样峰对象列表</param>
        /// <param name="std_rt">保留时间</param>
        /// <param name="pim">定性参数</param>
        /// <returns>成功匹配的峰对象</returns>
        public Peak IdentifyPeak(List <Peak> peak_list, double std_rt, double next_std_rt, PeakIdentificationMethod pim)
        {
            if (peak_list == null)
            {
                return(null);
            }

            List <Peak> _target_peak_list = new List <Peak>();

            double _band = CTimeBand.GetTimeBand(std_rt, pim);
            double _delta_time = 0.0, _delta_time_for_next_std = 0.0;

            foreach (Peak _p in peak_list)
            {
                //if (!FilterPeak(_p)) continue;

                _delta_time = Math.Abs(std_rt - _p.PeakPoint.X);
                _delta_time_for_next_std = Math.Abs(next_std_rt - _p.PeakPoint.X);

                if ((_delta_time <= _band) && (_delta_time <= _delta_time_for_next_std))
                {
                    _target_peak_list.Add(_p);
                }
            }

            return(CPeakSelect.PeakSelect(_target_peak_list, std_rt, pim.PeakSelect_Method));
        }