private void ProcessMeasurementResults()
        {
            logService.Debug("Processing measurement results..");
            double[] frequenciesLogHz, gainsDb, phasesDegrees;
            try
            {
                FRA4Picoscope.Instance.GetResults(out frequenciesLogHz, out gainsDb, out phasesDegrees);
            }
            catch (Exception ex)
            {
                EndMeasurement();
                MessageBox.Show(ex.Message, "Measurement Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            EndMeasurement();
            FRAFile measurementResult = new FRAFile(FRAFileType.FRA4PicoScope, frequenciesLogHz, gainsDb, phasesDegrees, FRA4Picoscope.Instance.TestJigReferenceResistor);

            measurementResult.MeasurementConditions = FRA4Picoscope.Instance.MeasurementConditionsSummary();
            m_FileCollection.Add(measurementResult);
            this.Cursor = Cursors.Default;
            if (FRA4Picoscope.Instance.AutoClosePicoFormWhenFinished)
            {
                this.Close();
            }
        }
Beispiel #2
0
 public InfoFile(FRAFile file)
 {
     InitializeComponent();
     this.TopMost                          = true;
     textBoxFileName.Text                  = file.FileName;
     textBoxPath.Text                      = file.FilePath;
     textBoxFileType.Text                  = file.FRAFileType.ToString();
     textBoxReferenceResistor.Text         = (file.ReferenceResistorOhms * 1000).ToString(FRAResult.GetImpedanceFormat(file.ReferenceResistorOhms * 1000));
     textBoxMinFrequency.Text              = file.MinFrequencyHz.ToString(FRAResult.GetFrequencyFormat(file.MinFrequencyHz, true));
     textBoxMaxFrequency.Text              = file.MaxFrequencyHz.ToString(FRAResult.GetFrequencyFormat(file.MaxFrequencyHz, true));
     textBoxNrOfDataPoints.Text            = file.Count.ToString();
     textBoxAverageGain.Text               = file.AverageGainDB.ToString(FRAResult.GetGainFormat(file.AverageGainDB));
     textBoxMaxGain.Text                   = file.MaxGainDB.ToString(FRAResult.GetGainFormat(file.MaxGainDB));
     textBoxMinGain.Text                   = file.MinGainDB.ToString(FRAResult.GetGainFormat(file.MinGainDB));
     textBoxMaxImpedance.Text              = file.MaxDUTImpedanceOhms.ToString(FRAResult.GetImpedanceFormat(file.MaxDUTImpedanceOhms));
     textBoxMinImpedance.Text              = file.MinDUTImpedanceOhms.ToString(FRAResult.GetImpedanceFormat(file.MinDUTImpedanceOhms));
     textBoxMaxCapacitance.Text            = file.MaxDUTCapacitancePicoFarad.ToString(FRAResult.GetCapacitanceFormat(file.MaxDUTCapacitancePicoFarad));
     textBoxMinCapacitance.Text            = file.MinDUTCapacitancePicoFarad.ToString(FRAResult.GetCapacitanceFormat(file.MinDUTCapacitancePicoFarad));
     textBoxMaxInductance.Text             = file.MaxDUTInductanceNanoHenry.ToString(FRAResult.GetInductanceFormat(file.MaxDUTInductanceNanoHenry));
     textBoxMinInductance.Text             = file.MinDUTInductanceNanoHenry.ToString(FRAResult.GetInductanceFormat(file.MinDUTInductanceNanoHenry));
     textBoxMax_ESR.Text                   = file.MaxDUT_ESR_Ohms.ToString(FRAResult.GetImpedanceFormat(file.MaxDUT_ESR_Ohms));
     textBoxMin_ESR.Text                   = file.MinDUT_ESR_Ohms.ToString(FRAResult.GetImpedanceFormat(file.MinDUT_ESR_Ohms));
     richTextBoxMeasurementConditions.Text = file.MeasurementConditions;
 }
 public FRAFileEventArgs(FRAFile file, FRAFileChange change)
 {
     m_File   = file;
     m_Change = change;
 }