AppendToAnalog1() public method

public AppendToAnalog1 ( double x, double y ) : void
x double
y double
return void
Esempio n. 1
0
        public void AcquireStop()
        {
            window.ClearAll();
            DataStore dataStore = Controller.GetController().DataStore;

            if (dataStore.NumberOfScans != 0)
            {
                // replot the averages
                UpdatePMTAveragePlots();
                UpdateTOFAveragePlots();

                // plot the average analog channels in the analog plots for convenience
                if (dataStore.AverageScan.AnalogChannelCount >= 1)
                {
                    window.AppendToAnalog1(dataStore.AverageScan.ScanParameterArray,
                                           dataStore.AverageScan.GetAnalogArray(0));
                }
                if (dataStore.AverageScan.AnalogChannelCount >= 2)
                {
                    window.AppendToAnalog2(dataStore.AverageScan.ScanParameterArray,
                                           dataStore.AverageScan.GetAnalogArray(1));
                }

                // replot the fits
                if (spectrumFitMode != FitMode.None && spectrumFitter.FittedValues.Length != 0)
                {
                    // watch out for the case where the scan is stopped when there are some points
                    // taken which have yet to be fitted
                    double[] xValues = new double[spectrumFitter.FittedValues.Length];
                    Array.Copy(dataStore.AverageScan.ScanParameterArray, xValues, xValues.Length);
                    window.PlotSpectrumFit(xValues, spectrumFitter.FittedValues);
                }
            }
            // enable the fit function selectors
            window.SetTofFitFunctionComboState(true);
            window.SetSpectrumFitFunctionComboState(true);
        }