public bool Equals(MSDataScan <TSpectrum> other) { if (ReferenceEquals(this, other)) { return(true); } return(SpectrumNumber.Equals(other.SpectrumNumber) && ParentFile.Equals(other.ParentFile)); }
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); }
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); } }