private void PopulateVMPropertiesFromChildren()
        {
            LJVScanVMCollection = new ObservableCollection <LJVScanVM>();
            var LJVScansList = TheLJVScanSummary.LJVScans.ToList();

            foreach (LJVScan scan in LJVScansList)
            {
                LJVScanVMCollection.Add(new LJVScanVM(scan));
            }
            var peakEQEsArray = LJVScansList.Select(x => Convert.ToDouble(x.MaxEQE)).ToArray();

            PeakEQE.PopulateStatsFromArrayAndRound(peakEQEsArray, 1);
            var EQEsAt1kArray = LJVScansList.Select(x => Convert.ToDouble(x.At1kNitsEQE)).ToArray();

            EQEat1k.PopulateStatsFromArrayAndRound(EQEsAt1kArray, 1);

            var ELSpecsList      = TheLJVScanSummary.ELSpectrums.ToList();
            var PeakLambdasArray = ELSpecsList.Select(x => Convert.ToDouble(x.ELPeakLambda)).ToArray();

            PeakLambda.PopulateStatsFromArrayAndRound(PeakLambdasArray, 1);
            var FWHMArray = ELSpecsList.Select(x => Convert.ToDouble(x.ELFWHM)).ToArray();

            FWHM.PopulateStatsFromArrayAndRound(FWHMArray, 1);
            var CIExArray = ELSpecsList.Select(x => Convert.ToDouble(x.CIEx)).ToArray();

            CIEx.PopulateStatsFromArrayAndRound(CIExArray, 3);
            var CIEyArray = ELSpecsList.Select(x => Convert.ToDouble(x.CIEy)).ToArray();

            CIEy.PopulateStatsFromArrayAndRound(CIEyArray, 3);
        }
Esempio n. 2
0
        public void PopulatePropertiesFromQDBatch()
        {
            UpdateEntityPropsFromName();
            var ELSpecs          = TheQDBatch.ELSpectrums.ToList();
            var PeakLambdasArray = ELSpecs.Select(x => Convert.ToDouble(x.ELPeakLambda)).ToArray();

            PeakLambda.PopulateStatsFromArrayAndRound(PeakLambdasArray, 1);
            var FWHMArray = ELSpecs.Select(x => Convert.ToDouble(x.ELFWHM)).ToArray();

            FWHM.PopulateStatsFromArrayAndRound(FWHMArray, 1);
            var CIExArray = ELSpecs.Select(x => Convert.ToDouble(x.CIEx)).ToArray();

            CIEx.PopulateStatsFromArrayAndRound(CIExArray, 3);
            var CIEyArray = ELSpecs.Select(x => Convert.ToDouble(x.CIEy)).ToArray();

            CIEy.PopulateStatsFromArrayAndRound(CIEyArray, 3);
            var DevicesWithThisQDBatch = TheQDBatch.Devices.ToList();

            NumberOfDevices = DevicesWithThisQDBatch.Count;
            BestEQE         = 0;
            List <double> peakEQEs = new List <double>();

            foreach (Device d in DevicesWithThisQDBatch)
            {
                foreach (DeviceLJVScanSummary ss in d.DeviceLJVScanSummaries)
                {
                    if (ss.MaxEQE > BestEQE)
                    {
                        BestEQE = ss.MaxEQE;
                    }
                    foreach (LJVScan scan in ss.LJVScans)
                    {
                        peakEQEs.Add(Convert.ToDouble(scan.MaxEQE));
                    }
                }
            }
            var peakEQEArray = peakEQEs.ToArray();

            PeakEQE.PopulateStatsFromArrayAndRound(peakEQEArray, 2);
        }