/// <summary>
        /// generates IChromeData object
        /// </summary>
        /// <param name="chromatogram"></param>
        /// <returns></returns>
        public static IChromData CreateChromatogramData(
            IChromatogram chromatogram)
        {
            //var yData = new double[numberDataPoints];
            //for (var i = 0; i < numberDataPoints; ++i)
            //{
            //    yData[i] = 0.0;
            //}

            //foreach (var peakDescription in peakDescriptions)
            //{
            //    AddPeak(yData, xMin, xStep, peakDescription);
            //}

            //AddNoise(yData, noiseAmplitude);
            //var data = new EquidistantData(yData, xMin, xStep);
            IData data      = new CustomeData(chromatogram.Data);
            var   chromData = new ChromData(data, XUnit.Minutes, "Abundance");

            return(chromData);
        }
示例#2
0
 public void Add(ChromData chromData)
 {
     _listChromData.Add(chromData);
 }
示例#3
0
 private bool HasThermoZerosBug(ChromData chromData)
 {
     // Make sure the intensity arrays are not just empty to avoid
     // an infinite loop.
     // Check for interleaving zeros and non-zero values
     bool seenData = false;
     var intensities = chromData.Intensities;
     for (int i = (intensities.Length > 0 && intensities[0] == 0 ? 0 : 1); i < intensities.Length; i += 2)
     {
         if (intensities[i] != 0)
             return false;
         // Because WIFF files have lots of zeros
         if (i < intensities.Length - 1 && intensities[i + 1] == 0)
             return false;
         seenData = true;
     }
     return seenData;
 }