Beispiel #1
0
        public void TestPPMConversion(double massToConvert, double currentMz, double expectedPPM)
        {
            var convertedPPM = PeptideMassCalculator.MassToPPM(massToConvert, currentMz);

            var reconvertedMass = PeptideMassCalculator.PPMToMass(convertedPPM, currentMz);

            Console.WriteLine("DelM of {0} Da converts to {1:F5} ppm at {2:F5} m/z ", massToConvert, convertedPPM, currentMz);

            Assert.AreEqual(expectedPPM, convertedPPM, 0.0001, "PPM Conversion error");

            Assert.AreEqual(massToConvert, reconvertedMass, 1E-05, "Da to PPM to Da round trip error");
        }