Beispiel #1
0
        private void Initialize()
        {
            RawCurveF c = GetCurveFromBlob(_scan, _numData);

            this.Points = c.ToString();
            this.Peaks  = PlatinumDbAccess.GetPeaksByScanId(_scanId);
            if (this.Peaks != null && this.Peaks.Count > 0)
            {
                BaseLineCorrectedCurveF correctedCurve = new BaseLineCorrectedCurveF
                {
                    Raw       = c,
                    BaseLeft  = this.BaseLeft,
                    BaseRight = this.BaseRight
                };
                correctedCurve.SetFraction(0, this.Peaks[0].Left);
                for (int i = 1; i <= this.Peaks.Count; i++)
                {
                    correctedCurve.SetFraction(i, this.Peaks[i - 1].Right);
                }

                //计算总值[]
                double total   = correctedCurve.GetFractionTotal();
                double albumin = 0;
                double others  = 0;
                foreach (var peak in this.Peaks)
                {
                    if (peak.Index == 1)
                    {
                        //albumin[]
                        double currFra = correctedCurve.GetFractionTotal(peak.Left, peak.Right);
                        peak.Percent = currFra / total;
                        albumin      = currFra;
                    }
                    else
                    {
                        //other(]
                        double currFra = correctedCurve.GetFractionTotal(peak.Left + 1, peak.Right);
                        peak.Percent = currFra / total;
                        others      += currFra;
                    }

                    if (peak.MSpike)
                    {
                        //m-spike()
                        double currSpike = correctedCurve.GetFractionTotal(peak.Left + 1, peak.Right - 1);
                        peak.Percent = currSpike / total;
                    }
                }

                this.AG = albumin / others;
            }
        }
 public List <DateTime> GetAllTestDate()
 {
     return(PlatinumDbAccess.GetAllDates().Select(d => d.Date).ToList());
 }
 public List <ShowBase> GetResultByFilterDate(DateTime testDate)
 {
     return(PlatinumDbAccess.GetReportInfos(testDate).ToList());
 }