private void FitAndPlotSpectrum(Scan scan) { FitScan(scan, startTOFGate, endTOFGate); // plot the fit window.ClearSpectrumFit(); window.PlotSpectrumFit(scan.ScanParameterArray, spectrumFitter.FittedValues); // update the parameter report window.SetLabel(window.spectrumFitResultsLabel, spectrumFitter.ParameterReport); }