예제 #1
0
 public bool Equals(MSDataScan <TSpectrum> other)
 {
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(SpectrumNumber.Equals(other.SpectrumNumber) && ParentFile.Equals(other.ParentFile));
 }
예제 #2
0
        protected virtual MSDataScan <TSpectrum> GetMSDataScan(int spectrumNumber)
        {
            int msn = GetMsnOrder(spectrumNumber);

            MSDataScan <TSpectrum> scan = msn > 1 ? new MsnDataScan <TSpectrum>(spectrumNumber, msn, this) : new MSDataScan <TSpectrum>(spectrumNumber, msn, this);

            return(scan);
        }
예제 #3
0
        public virtual IEnumerable <MSDataScan <TSpectrum> > GetMsScans(double firstRT, double lastRT)
        {
            int spectrumNumber = GetSpectrumNumber(firstRT - 0.0000001);

            while (spectrumNumber <= LastSpectrumNumber)
            {
                MSDataScan <TSpectrum> scan = GetMsScan(spectrumNumber++);
                double rt = scan.RetentionTime;
                if (rt < firstRT)
                {
                    continue;
                }
                if (rt > lastRT)
                {
                    yield break;
                }
                yield return(scan);
            }
        }