Ejemplo n.º 1
0
 public static double IntegralArea(LCPeak argLCPeak)
 {
     double AreaOfCurve = 0.0;
     if (argLCPeak.RawPoint.Count > 0)
     {
         AreaOfCurve = IntegralArea(argLCPeak.RawPoint);
     }
     return AreaOfCurve;
 }
Ejemplo n.º 2
0
        public static double IntegralArea(LCPeak argLCPeak)
        {
            double AreaOfCurve = 0.0;

            if (argLCPeak.RawPoint.Count > 0)
            {
                AreaOfCurve = IntegralArea(argLCPeak.RawPoint);
            }
            return(AreaOfCurve);
        }
Ejemplo n.º 3
0
        public void CalcLCPeak()
        {
            List<MSPoint> lstMSPs = new List<MSPoint>();
            foreach (MatchedGlycanPeak Peak in _MatchedPeaksInScan)
            {
                lstMSPs.Add(new MSPoint(Convert.ToSingle(Math.Round(Peak.ScanTime,5)), Peak.Peak.MonoIntensity));
            }
            lstMSPs.Sort(delegate(MSPoint p1, MSPoint p2) { return p1.Mass.CompareTo(p2.Mass); });

                List<MassLib.MSPoint> lstSmoothPnts = new List<MassLib.MSPoint>();
                lstSmoothPnts = MassLib.Smooth.SavitzkyGolay.Smooth(lstMSPs, MassLib.Smooth.SavitzkyGolay.FILTER_WIDTH.FILTER_WIDTH_7);

                //Peak Finding
                List<MassLib.LCPeak> lcPk = null;
                lcPk = MassLib.LCPeakDetection.PeakFinding(lstSmoothPnts, 0.1f, 0.01f);
                MassLib.LCPeak MergedLCPeak = null;
                if (lcPk.Count > 0)
                {
                    MergedLCPeak = new LCPeak(lcPk[0].StartTime, lcPk[lcPk.Count - 1].EndTime, lcPk[0].RawPoint);
                    if (lcPk.Count > 1)
                    {
                        for (int i = 1; i < lcPk.Count; i++)
                        {
                            MergedLCPeak.RawPoint.AddRange(lcPk[i].RawPoint);
                        }
                    }
                }
                else
                {
                    MergedLCPeak = new LCPeak(lstSmoothPnts[0].Mass,lstSmoothPnts[lstSmoothPnts.Count-1].Mass, lstSmoothPnts);
                }
                _LCPeak = MergedLCPeak;
        }