public void getSpectrum_Test1()
        {
            var run = new XCaliburRun2(FileRefs.RawDataMSFiles.OrbitrapStdFile1);

            var xydata = run.GetMassSpectrum(new Backend.Core.ScanSet(6005));

            Assert.IsTrue(xydata.Xvalues.Length > 1000);


            // TestUtilities.DisplayXYValues(xydata);
        }
        public void getSummedSpectrum_Test1()
        {
            var run = new XCaliburRun2(FileRefs.RawDataMSFiles.OrbitrapStdFile1);


            var scanset = new ScanSet(6005, new int[] { 6005, 6012, 6019 });

            var xydata = run.GetMassSpectrum(scanset);

            Assert.IsTrue(xydata.Xvalues.Length > 1000);
            //TestUtilities.DisplayXYValues(run.XYData);
        }
        public void getSummedSpectrum_SpeedTest1()
        {
            using (var run = new XCaliburRun2(FileRefs.RawDataMSFiles.OrbitrapStdFile1))
            {
                var scanset = new ScanSet(6005, new int[] { 6005, 6012, 6019 });

                var numIterations = 50;

                var watch     = new Stopwatch();
                var timeStats = new List <long>();

                for (var i = 0; i < numIterations; i++)
                {
                    watch.Start();
                    run.GetMassSpectrum(scanset);
                    watch.Stop();
                    timeStats.Add(watch.ElapsedMilliseconds);
                    watch.Reset();
                }

                Console.WriteLine("Average reading time when summing 3 spectra = " + timeStats.Average());
            }
        }