Exemplo n.º 1
0
        private String CentroidToString(ICentroid2 centroid)
        {
            if (centroid == null)
            {
                return("no centroid");
            }


            return(String.Format(" Mz={0,10:F5}, I={1:E5}, C={2}, E={3,-5} F={4,-5} M={5,-5} R={6,-5} Res={7}",
                                 centroid.Mz, centroid.Intensity, centroid.Charge ?? -1, centroid.IsExceptional,
                                 centroid.IsFragmented, centroid.IsMerged, centroid.IsReferenced, centroid.Resolution));
        }
Exemplo n.º 2
0
        private ICentroid2 GetTopPeak(IEnumerable <ICentroid2> centroids)
        {
            //gets the highest intensity centroid
            Double     max = -1.0;
            ICentroid2 top = null;

            foreach (ICentroid2 cent in centroids)
            {
                if (max < cent.Intensity)
                {
                    max = cent.Intensity;
                    top = cent;
                }
            }
            return(top);
        }