Пример #1
0
        public void GetMSLevelTest1()
        {
            Run run       = new ICR2LSRun(icr2LSRawDatafile1);
            int scanLevel = run.GetMSLevel(2210);

            Console.WriteLine(scanLevel);
        }
Пример #2
0
        public void test1()
        {
            Run run = new ICR2LSRun(icr2LSRawDatafile1);

            run.CurrentScanSet = new ScanSet(2210);

            Task msGen = new GenericMSGenerator(732, 746);

            msGen.Execute(run.ResultCollection);

            Task peakdetector = new DeconToolsPeakDetector();

            ((DeconToolsPeakDetector)peakdetector).PeakBackgroundRatio = 5;
            ((DeconToolsPeakDetector)peakdetector).SigNoiseThreshold   = 2;

            peakdetector.Execute(run.ResultCollection);

            Console.WriteLine("Peaks detected = " + run.PeakList.Count);

            TomN14N15Analyzer analyzer = new TomN14N15Analyzer();

            analyzer.ExtractN14N15Values(run.ResultCollection);

            Console.WriteLine("Peaks detected = " + run.PeakList.Count);

            Assert.AreEqual(14, run.PeakList.Count);
        }
Пример #3
0
        public void GetSpectrumTest1()
        {
            Run run = new ICR2LSRun(icr2LSRawDatafile1);

            run.GetMassSpectrum(new ScanSet(2210), 0, 2000);

            Assert.AreEqual(211062, run.XYData.Xvalues.Length);
        }
Пример #4
0
        public void GetSpectrumSpeedTest2()
        {
            Run run           = new ICR2LSRun(icr2LSRawDatafile1);
            int numScansToGet = 10;

            Stopwatch sw = new Stopwatch();

            sw.Start();
            for (int i = 0; i < numScansToGet; i++)
            {
                run.GetMassSpectrum(new ScanSet(2210), 500, 600);   //
            }
            sw.Stop();

            double avgTime = ((double)sw.ElapsedMilliseconds) / (double)numScansToGet;

            Console.WriteLine("Average GetScans() time in milliseconds for " + numScansToGet + " scans = \t" + avgTime);   //141 ms
        }
Пример #5
0
        public void GetTICTest1()
        {
            int scanNum = 2210;

            Run run = new ICR2LSRun(icr2LSRawDatafile1);

            run.GetMassSpectrum(new ScanSet(scanNum), 800, 2000);

            float ticVal = run.GetTIC(400, 2000);

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            ticVal = run.GetTIC(400, 2000);
            sw.Stop();
            Console.WriteLine(sw.ElapsedMilliseconds);

            Assert.AreEqual(3070655000m, (decimal)ticVal);     //TODO: need to confirm this number
        }
Пример #6
0
        public void GetSpectrumTest2()
        {
            Run run = new ICR2LSRun(icr2LSRawDatafile1);

            Stopwatch sw = new Stopwatch();

            sw.Start();
            run.GetMassSpectrum(new ScanSet(2210), 500, 550);
            sw.Stop();

            Console.WriteLine(sw.ElapsedMilliseconds);

            StringBuilder sb = new StringBuilder();

            TestUtilities.GetXYValuesToStringBuilder(sb, run.XYData.Xvalues, run.XYData.Yvalues);
            Console.Write(sb.ToString());

            Assert.AreEqual(18580, run.XYData.Xvalues.Length);
        }
Пример #7
0
        public void GetNumScansTest1()
        {
            Run run = new ICR2LSRun(icr2LSRawDatafile1);

            Console.WriteLine(run.GetNumMSScans());
        }