private bool AddEnvelope(ChromatographProfile chro, PeakList <Peak> curPeaks)
        {
            ChromatographProfileScan envelope = FindEnvelope(curPeaks, chro.IsotopicIons, options.MzTolerancePPM);

            if (envelope.Count < options.ProfileLength)
            {
                return(false);
            }

            if (envelope.CalculateProfileCorrelation(chro.IsotopicIons) < options.MinimumCorrelation)
            {
                return(false);
            }

            chro.Profiles.Add(envelope);
            return(true);
        }
        private bool AddEnvelope(ChromatographProfile chro, CacheRawFile rawReader, List <FullMS> fullMSList, int scanIndex)
        {
            PeakList <Peak> ms1 = ReadFullMS(rawReader, fullMSList, scanIndex);

            ChromatographProfileScan envelope = null;

            if (!profileFinder.Find(ms1, chro, options.MzTolerancePPM, options.MinimumProfileLength, ref envelope))
            {
                return(false);
            }

            if (options.MinimumProfileCorrelation > 0 && envelope.CalculateProfileCorrelation(chro.IsotopicIntensities) < options.MinimumProfileCorrelation)
            {
                return(false);
            }

            chro.Profiles.Add(envelope);
            return(true);
        }