Esempio n. 1
0
        public void GetMassSpectrumTest1()
        {
            Run run = new IMFRun(FileRefs.RawDataMSFiles.IMFStdFile1);

            var xydata = run.GetMassSpectrum(new ScanSet(233), 200, 2000);

            var numscans = run.GetNumMSScans();

            Assert.AreEqual(600, numscans);

            var xvals = new float[1];
            var yvals = new float[1];

            xydata.GetXYValuesAsSingles(ref xvals, ref yvals);


            var sb = new StringBuilder();

            for (var i = 0; i < xvals.Length; i++)
            {
                sb.Append(xvals[i]);
                sb.Append("\t");
                sb.Append(yvals[i]);
                sb.Append(Environment.NewLine);
            }
            Console.Write(sb.ToString());

            Assert.AreEqual(2595, xvals.Length);
            Assert.AreEqual(2595, yvals.Length);
        }
Esempio n. 2
0
        public void MSGeneratorOnIMFFileTest1()
        {
            Run run = new IMFRun(imfFilepath);

            run.CurrentScanSet = new ScanSet(233, 229, 237);

            run.GetMassSpectrum(run.CurrentScanSet, 200, 2000);

            Assert.AreEqual(9908, run.XYData.Xvalues.Length);
        }
Esempio n. 3
0
        public void GetMassSpectrumAndSumAllTest()
        {
            Run run    = new IMFRun(FileRefs.RawDataMSFiles.IMFStdFile1);
            var xydata = run.GetMassSpectrum(new ScanSet(10000, 1, 20000), 200, 2000);      // this will sum scans 1 through 20000 (if <20000 scans, then will sum all available)

            var numscans = run.GetNumMSScans();

            Assert.AreEqual(600, numscans);
            Assert.AreEqual(38326, xydata.Xvalues.Length);
            Assert.AreEqual(38326, xydata.Yvalues.Length);
        }