Example #1
0
        private async void Wiggle()
        {
            ROSADevice device = d as ROSADevice;
            ROSAOutput output = o as ROSAOutput;

            bool wiggleTestResult = true;

            WiggleData wiggleData = await TestCalculations.ROSAWiggleTest(device.V_Test, (device.RSSI_VPD == "VPD"), (int)device.Wiggle_Time, wiggleProgress);

            wiggleMin.Text = wiggleData.min.ToString("F") + " mW";
            wiggleMax.Text = wiggleData.max.ToString("F") + " mW";
            wiggleAvg.Text = wiggleData.avg.ToString("F") + " mW";

            double i_wiggle = 10 * Math.Log10(wiggleData.max / wiggleData.min);

            iWiggle.Text = i_wiggle.ToString("F") + " dB";
            bool I_Wiggle_Pass = (i_wiggle <= device.PD_Wiggle_Max);

            output.Wiggle_Pass = I_Wiggle_Pass;

            if (!I_Wiggle_Pass)
            {
                iWiggle.Foreground = Brushes.OrangeRed;
                wiggleTestResult   = false;
            }

            measurementPanel.Visibility = Visibility.Visible;
            var w = Window.GetWindow(this) as MainWindow;

            if (wiggleTestResult)
            {
                passed                  = true;
                testMessage.Text        = "Test Passed";
                testMessage.Foreground  = Brushes.ForestGreen;
                StartTestButton.Content = "End job";
                output.Result           = true;
                MainWindow.Conn.SaveROSAOutput(output);
                d        = device;
                o        = output;
                w.device = d;
                w.output = o;
            }
            else
            {
                testMessage.Text       = "Test Failed";
                testMessage.Foreground = Brushes.OrangeRed;
                if (numTries >= 3)
                {
                    StartTestButton.Content = "Go home";
                    output.Result           = false;
                    MainWindow.Conn.SaveROSAOutput(output);
                }
                else
                {
                    StartTestButton.Content = "Retry test";
                }
            }
        }
Example #2
0
        private async void Sweep()
        {
            TOSADevice device = d as TOSADevice;
            TOSAOutput output = o as TOSAOutput;

            bool sweepResult = true;

            SweepData sweepData = await TestCalculations.SweepTest(device.I_Start, device.I_Stop, device.I_Step, sweepProgress);

            sd = sweepData;

            double r = TestCalculations.FindSlope(sweepData.currents, sweepData.voltages, device.I_OP_Min, device.I_OP_Max) * 1000;

            resistance.Text = r.ToString("F") + " Ω";
            bool R_Pass = (r >= device.RS_Min && r <= device.RS_Max);

            output.RS      = r;
            output.RS_Pass = R_Pass;

            if (!R_Pass)
            {
                resistance.Foreground = Brushes.OrangeRed;
                sweepResult           = false;
            }

            double se = TestCalculations.FindSlope(sweepData.currents, sweepData.powers, device.I_OP_Min, device.I_OP_Max);

            slopeEfficiency.Text = se.ToString("F");

            bool SE_Pass = (se >= device.SE_Min && se <= device.SE_Max);

            output.SE      = se;
            output.SE_Pass = SE_Pass;

            if (!SE_Pass)
            {
                slopeEfficiency.Foreground = Brushes.OrangeRed;
                sweepResult = false;
            }

            double ith = TestCalculations.ThresholdCurrent(sweepData, device.I_OP_Min, device.I_OP_Max);

            thresholdCurrent.Text = ith.ToString("F") + " mA";
            bool ITH_Pass = (ith >= device.Ith_Min && ith <= device.Ith_Max);

            output.Ith      = ith;
            output.Ith_Pass = ITH_Pass;

            measurementPanel.Visibility = Visibility.Visible;

            if (!ITH_Pass)
            {
                thresholdCurrent.Foreground = Brushes.OrangeRed;
                sweepResult = false;
            }

            double p_test = sweepData.powers.ElementAt(sweepData.setcurrents.IndexOf(device.I_Test));

            testPower.Text = p_test.ToString("F") + " mW";
            bool P_Test_Pass = (p_test >= device.P_Test_FC_Min && p_test <= device.P_Test_FC_Max);

            output.P_Test_FC      = p_test;
            output.P_Test_FC_Pass = P_Test_Pass;

            if (!P_Test_Pass)
            {
                testPower.Foreground = Brushes.OrangeRed;
                sweepResult          = false;
            }

            double popct = p_test / output.P_Test_OB;

            POPCT.Text = (100 * popct).ToString("F") + " %";
            bool POPCT_Pass = (popct >= device.POPCT_Min);

            output.POPCT      = popct;
            output.POPCT_Pass = POPCT_Pass;

            if (!POPCT_Pass)
            {
                testPower.Foreground = Brushes.OrangeRed;
                sweepResult          = false;
            }

            double ibm = TestCalculations.IBM_PBM(sweepData, device.P_BM_Test);

            monitorCurrent.Text = ibm.ToString("F") + " mA";
            bool IBM_Pass = (ibm >= device.IBM_Min && ibm <= device.IBM_Max);

            output.I_BM_P_BM_Test      = ibm;
            output.I_BM_P_BM_Test_Pass = IBM_Pass;

            if (!IBM_Pass)
            {
                monitorCurrent.Foreground = Brushes.OrangeRed;
                sweepResult = false;
            }

            double pmin = sweepData.powers.ElementAt(sweepData.setcurrents.IndexOf(device.I_OP_Min));
            double pmax = sweepData.powers.ElementAt(sweepData.setcurrents.IndexOf(device.I_OP_Max));


            double ibmslope = TestCalculations.FindSlope(sweepData.powers, sweepData.ibms, pmin, pmax);

            ibmSlope.Text     = ibmslope.ToString("F") + " A/W";
            output.I_BM_Slope = ibmslope;

            double ibmtrack = TestCalculations.IBM_Track(sweepData, device.I_OP_Min, device.I_OP_Max);

            ibmTrack.Text = ibmtrack.ToString("F");
            bool IBM_Track_Pass = (ibmtrack >= device.IBM_Tracking_Min && ibmtrack <= device.IBM_Tracking_Max);

            output.IBM_Track       = ibmtrack;
            output.I_BM_Track_Pass = IBM_Track_Pass;

            if (!IBM_Track_Pass)
            {
                ibmTrack.Foreground = Brushes.OrangeRed;
                sweepResult         = false;
            }

            measurementPanel.Visibility = Visibility.Visible;
            var w = Window.GetWindow(this) as MainWindow;

            if (sweepResult)
            {
                passed                  = true;
                testMessage.Text        = "Test Passed";
                testMessage.Foreground  = Brushes.ForestGreen;
                StartTestButton.Content = "Next step";
                d        = device;
                o        = output;
                w.device = d;
                w.output = o;
            }
            else
            {
                testMessage.Text       = "Test Failed";
                testMessage.Foreground = Brushes.OrangeRed;
                if (numTries >= 3)
                {
                    StartTestButton.Content = "Go home";
                    output.Result           = false;
                    MainWindow.Conn.SaveTOSAOutput(output);
                }
                else
                {
                    StartTestButton.Content = "Retry test";
                }
            }

            SaveLIButton.Visibility = Visibility.Visible;
        }
Example #3
0
        private void OpenBoreTest()
        {
            TOSADevice device = d as TOSADevice;
            TOSAOutput output = o as TOSAOutput;

            bool openBoreResult = true;

            OBData ob = TestCalculations.OpenBoreTest(device.I_Test, device.VBR_Test);

            foreach (TextBlock tb in Utils.FindVisualChildren <TextBlock>(measurementPanel))
            {
                tb.Foreground = Brushes.White;
            }

            testCurrent.Text = ob.i_test.ToString("F") + " mA";
            output.I_Test    = ob.i_test;

            bool I_Test_Pass = (Math.Abs(device.I_Test - ob.i_test) / device.I_Test <= device.I_Test_Tol);

            if (!I_Test_Pass)
            {
                testCurrent.Foreground = Brushes.OrangeRed;
                openBoreResult         = false;
            }

            testPower.Text = ob.p_test.ToString("F") + " mW";

            bool P_Test_OB_Pass = (ob.p_test >= device.P_Test_OB_Min && ob.p_test <= device.P_Test_OB_Max);

            output.P_Test_OB = ob.p_test;
            output.P_OB_Pass = P_Test_OB_Pass;

            if (!P_Test_OB_Pass)
            {
                testPower.Foreground = Brushes.OrangeRed;
                openBoreResult       = false;
            }

            testVoltage.Text = ob.v_test.ToString("F") + " V";

            bool V_Test_OB_Pass = (ob.v_test >= device.V_Test_Min && ob.v_test <= device.V_Test_Max);

            output.V_Test      = ob.v_test;
            output.V_Test_Pass = V_Test_OB_Pass;

            if (!V_Test_OB_Pass)
            {
                testVoltage.Foreground = Brushes.OrangeRed;
                openBoreResult         = false;
            }

            monitorCurrent.Text = ob.ibm_test.ToString("F") + " mA";

            bool IBM_Test_Pass = (ob.ibm_test >= device.IBM_Min && ob.ibm_test <= device.IBM_Max);

            if (!IBM_Test_Pass)
            {
                monitorCurrent.Foreground = Brushes.OrangeRed;
                openBoreResult            = false;
            }

            output.IBM_Test_OB = ob.ibm_test;
            output.IBM_Pass    = IBM_Test_Pass;

            reverseBreakdownCurrent.Text = ob.ibr.ToString("F") + " µA";
            reverseBreakdownVoltage.Text = device.VBR_Test.ToString("F") + " V";

            bool IBR_Pass = (Math.Abs(ob.ibr) <= device.IBR_Max);

            if (!IBR_Pass)
            {
                reverseBreakdownCurrent.Foreground = Brushes.OrangeRed;
                openBoreResult = false;
            }

            output.IBR      = ob.ibr;
            output.IBR_Pass = IBR_Pass;

            measurementPanel.Visibility = Visibility.Visible;
            var w = Window.GetWindow(this) as MainWindow;

            if (openBoreResult)
            {
                passed                  = true;
                testMessage.Text        = "Test Passed";
                testMessage.Foreground  = Brushes.ForestGreen;
                StartTestButton.Content = "Next step";
                d        = device;
                o        = output;
                w.device = d;
                w.output = o;
            }
            else
            {
                testMessage.Text       = "Test Failed";
                testMessage.Foreground = Brushes.OrangeRed;
                if (numTries >= 3)
                {
                    StartTestButton.Content = "Go home";
                    output.Result           = false;
                    MainWindow.Conn.SaveTOSAOutput(output);
                }
                else
                {
                    StartTestButton.Content = "Retry test";
                }
            }
        }
Example #4
0
        private void DarkLight()
        {
            ROSADevice device = d as ROSADevice;
            ROSAOutput output = o as ROSAOutput;

            bool darkLightResult = true;

            DLData dl = TestCalculations.DarkLightTest(device.V_Test, (device.RSSI_VPD == "VPD"));

            foreach (TextBlock tb in Utils.FindVisualChildren <TextBlock>(measurementPanel))
            {
                tb.Foreground = Brushes.White;
            }

            vTest.Text    = device.V_Test.ToString("F") + " V";
            output.V_Test = device.V_Test;

            iTIA.Text = dl.i_tia.ToString("F") + " mA";
            bool I_TIA_Pass = (dl.i_tia <= device.I_TIA_Max);

            output.I_TIA      = dl.i_tia;
            output.I_TIA_Pass = I_TIA_Pass;

            if (!I_TIA_Pass)
            {
                iTIA.Foreground = Brushes.OrangeRed;
                darkLightResult = false;
            }

            iDark.Text = dl.i_dark.ToString("F") + " mA";

            output.I_Dark = dl.i_dark;

            iPD.Text = dl.i_pd.ToString("F") + " mA";

            responsivity.Text = dl.responsivity.ToString("F");
            bool Responsivity_Pass = (dl.responsivity >= device.RESP_Min);

            output.Responsivity = dl.responsivity;
            output.RESP_Pass    = Responsivity_Pass;

            if (!Responsivity_Pass)
            {
                responsivity.Foreground = Brushes.OrangeRed;
                darkLightResult         = false;
            }

            measurementPanel.Visibility = Visibility.Visible;
            var w = Window.GetWindow(this) as MainWindow;

            darkLightResult = true;

            if (darkLightResult)
            {
                passed                  = true;
                testMessage.Text        = "Test Passed";
                testMessage.Foreground  = Brushes.ForestGreen;
                StartTestButton.Content = "Next step";
                d        = device;
                o        = output;
                w.device = d;
                w.output = o;
            }
            else
            {
                testMessage.Text       = "Test Failed";
                testMessage.Foreground = Brushes.OrangeRed;
                if (numTries >= 3)
                {
                    StartTestButton.Content = "Go home";
                    output.Result           = false;
                    MainWindow.Conn.SaveROSAOutput(output);
                }
                else
                {
                    StartTestButton.Content = "Retry test";
                }
            }
        }
Example #5
0
        private async void Wiggle()
        {
            TOSADevice device = d as TOSADevice;
            TOSAOutput output = o as TOSAOutput;

            bool wiggleTestResult = true;

            WiggleData wiggleData = await TestCalculations.TOSAWiggleTest((int)device.Wiggle_Time, wiggleProgress);

            wiggleMin.Text = wiggleData.min.ToString("F") + " mW";
            wiggleMax.Text = wiggleData.max.ToString("F") + " mW";
            wiggleAvg.Text = wiggleData.avg.ToString("F") + " mW";

            double popct_wiggle = wiggleData.min / output.P_Test_OB;

            popctWiggle.Text = (100 * popct_wiggle).ToString("F") + " %";
            bool POPCT_Wiggle_Pass = (popct_wiggle >= device.POPCT_Wiggle_Min);

            output.POPCT_Wiggle_Min      = popct_wiggle;
            output.POPCT_Wiggle_Min_Pass = POPCT_Wiggle_Pass;

            if (!POPCT_Wiggle_Pass)
            {
                popctWiggle.Foreground = Brushes.OrangeRed;
                wiggleTestResult       = false;
            }

            double pwiggle = 10 * Math.Log10(wiggleData.max / wiggleData.min);

            wiggleDb.Text = pwiggle.ToString("F") + " dB";
            bool Pwiggle_Pass = (pwiggle <= device.Pwiggle_Max);

            output.Wiggle_dB      = pwiggle;
            output.Wiggle_dB_Pass = Pwiggle_Pass;

            if (!Pwiggle_Pass)
            {
                wiggleDb.Foreground = Brushes.OrangeRed;
                wiggleTestResult    = false;
            }

            measurementPanel.Visibility = Visibility.Visible;
            var w = Window.GetWindow(this) as MainWindow;

            if (wiggleTestResult)
            {
                passed                  = true;
                testMessage.Text        = "Test Passed";
                testMessage.Foreground  = Brushes.ForestGreen;
                StartTestButton.Content = "End job";
                output.Result           = true;
                MainWindow.Conn.SaveTOSAOutput(output);
                d        = device;
                o        = output;
                w.device = d;
                w.output = o;
            }
            else
            {
                testMessage.Text       = "Test Failed";
                testMessage.Foreground = Brushes.OrangeRed;
                if (numTries >= 3)
                {
                    StartTestButton.Content = "Go home";
                    output.Result           = false;
                    MainWindow.Conn.SaveTOSAOutput(output);
                }
                else
                {
                    StartTestButton.Content = "Retry test";
                }
            }

            NextDeviceButton.Visibility = Visibility.Visible;
        }