Exemple #1
0
            private static PointPair CreatePointPair(int iGroup, ICollection <double> listValues, ref double maxY, ref double minY)
            {
                if (listValues.Count == 0)
                {
                    return(PointPairMissing(iGroup));
                }

                var statValues = new Statistics(listValues);

                PointPair pointPair;

                if (Settings.Default.ShowPeptideCV)
                {
                    double cvRatio = statValues.StdDev() / statValues.Mean();
                    if (!Settings.Default.PeakDecimalCv)
                    {
                        cvRatio *= 100;
                    }
                    pointPair = MeanErrorBarItem.MakePointPair(iGroup, cvRatio, 0);
                }
                else
                {
                    pointPair = MeanErrorBarItem.MakePointPair(iGroup, statValues.Mean(), statValues.StdDev());
                }
                maxY = Math.Max(maxY, MeanErrorBarItem.GetYTotal(pointPair));
                minY = Math.Min(minY, MeanErrorBarItem.GetYMin(pointPair));
                return(pointPair);
            }
Exemple #2
0
            public PointPair MakeBarValue(double xValue, IEnumerable <double> values)
            {
                var statValues = new Statistics(values);

                if (Cv)
                {
                    var cv = statValues.StdDev() / statValues.Mean();
                    return(MeanErrorBarItem.MakePointPair(xValue, CvDecimal ? cv : cv *100, 0));
                }
                return(MeanErrorBarItem.MakePointPair(xValue, statValues.Mean(), statValues.StdDev()));
            }
Exemple #3
0
 protected static PointPair PointPairMissing(int iGroup)
 {
     return(MeanErrorBarItem.MakePointPair(iGroup, PointPairBase.Missing, PointPairBase.Missing));
 }