private ScanSet CreateScanSet(int scanNum) { ScanSetFactory ssf = new ScanSetFactory(); int closestScanNum = Run.GetClosestMSScan(scanNum, DeconTools.Backend.Globals.ScanSelectionMode.CLOSEST); return(ssf.CreateScanSet(this.Run, closestScanNum, this.NumScansSummed)); }
public void Test1() { var rf = new RunFactory(); var run = rf.CreateRun(FileRefs.RawDataMSFiles.OrbitrapStdFile1); var ssf = new ScanSetFactory(); var scan = ssf.CreateScanSet(run, 6005, 11); Console.WriteLine(scan); }
public void CreateScanSetBasedOnRangeOfScansTest1() { var startScan = 5970; var stopScan = 6035; var rf = new RunFactory(); var run = rf.CreateRun(FileRefs.RawDataMSFiles.OrbitrapStdFile1); var ssf = new ScanSetFactory(); var scan = ssf.CreateScanSet(run, 6005, startScan, stopScan); Assert.AreEqual("6005 {5970, 5977, 5984, 5991, 5998, 6005, 6012, 6019, 6026, 6033}", scan.ToString()); }
public ScanSet GetLCScanSetForChromPeak(Peak chromPeak, Run run, int numLCScansToSum) { ScanSet scanset; if (chromPeak == null || chromPeak.XValue == 0) { return(null); //throw new NullReferenceException("Trying to use chromPeak to generate mass spectrum, but chrompeak is null"); } var bestScan = (int)chromPeak.XValue; bestScan = run.GetClosestMSScan(bestScan, DeconTools.Backend.Globals.ScanSelectionMode.CLOSEST); scanset = _scansetFactory.CreateScanSet(run, bestScan, numLCScansToSum); if (run.MSFileType == DeconTools.Backend.Globals.MSFileType.PNNL_UIMF) { // GORD: Update this when fixing CurrentFrameSet throw new NotSupportedException("UIMF worflows should use a UIMF specific peak selector."); } return(scanset); }