Пример #1
0
        public IDDCf252Normalization(AnalysisDefs.NormParameters npp)
        {
            np = npp;
            InitializeComponent();
            RefDoublesDateTimePicker.Value = np.refDate;
            SourceIdTextBox.Text = np.sourceId;

            NormConstTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            NormConstTextBox.NumberFormat = NumericTextBox.Formatter.F4;
            NormConstTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            NormConstTextBox.Value = np.currNormalizationConstant.v;

            NormConstErrorTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            NormConstErrorTextBox.NumberFormat = NumericTextBox.Formatter.F4;
            NormConstErrorTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            NormConstErrorTextBox.Value = np.currNormalizationConstant.err;

            AccLimitPercentTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            AccLimitPercentTextBox.NumberFormat = NumericTextBox.Formatter.F2;
            AccLimitPercentTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            AccLimitPercentTextBox.Value = np.acceptanceLimitPercent;

            RefDoublesRateTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            RefDoublesRateTextBox.NumberFormat = NumericTextBox.Formatter.F3;
            RefDoublesRateTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            RefDoublesRateTextBox.Value = np.cf252RefDoublesRate.v;

            RefDoublesRateErrorTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            RefDoublesRateErrorTextBox.NumberFormat = NumericTextBox.Formatter.F3;
            RefDoublesRateErrorTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            RefDoublesRateErrorTextBox.Value = np.cf252RefDoublesRate.err;

            PrecisionLimitTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            PrecisionLimitTextBox.NumberFormat = NumericTextBox.Formatter.F2;
            PrecisionLimitTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            PrecisionLimitTextBox.Value = np.initSrcPrecisionLimit;

            AccLimitStdDevTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            AccLimitStdDevTextBox.NumberFormat = NumericTextBox.Formatter.F2;
            AccLimitStdDevTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            AccLimitStdDevTextBox.Value = np.acceptanceLimitStdDev;

            MovementDistanceTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            MovementDistanceTextBox.NumberFormat = NumericTextBox.Formatter.F2;
            MovementDistanceTextBox.NumStyles = System.Globalization.NumberStyles.AllowDecimalPoint;
            MovementDistanceTextBox.Value = np.biasTestAddasrcPosition; 

            AddASourceCheckBox.Checked = np.biasTestUseAddasrc;
        }
Пример #2
0
        public IDDCmPuRatio(AnalysisDefs.AcquireParameters acqp)
        {
            InitializeComponent();
            acq = acqp;
            AnalysisDefs.INCCAnalysisParams.cm_pu_ratio_rec lcmpuratio = NC.App.DB.Cm_Pu_RatioParameters.Get();
            if (lcmpuratio == null)
                cmpuratio = new AnalysisDefs.INCCAnalysisParams.cm_pu_ratio_rec();
            else
                cmpuratio = new AnalysisDefs.INCCAnalysisParams.cm_pu_ratio_rec(lcmpuratio);

            LabelIdTextBox.Text = cmpuratio.cm_id_label;
            InputBatchIdTextBox.Text = cmpuratio.cm_input_batch_id;
            IdTextBox.Text = cmpuratio.cm_id;
            CmPuRatioTextBox.Text = cmpuratio.cm_pu_ratio.v.ToString("F7");
            CmPuRatioErrorTextBox.Text = cmpuratio.cm_pu_ratio.err.ToString("F7");
            CmURatioTextBox.Text = cmpuratio.cm_u_ratio.v.ToString("F7");
            CmURatioErrorTextBox.Text = cmpuratio.cm_u_ratio.err.ToString("F7");
            HalfLifeTextBox.Text = cmpuratio.pu_half_life.ToString("F4");
            DeclaredU235TextBox.Text = cmpuratio.cm_dcl_u235_mass.ToString("F6");
            DeclaredUTextBox.Text = cmpuratio.cm_dcl_u_mass.ToString("F6");
            DeclaredPuTextBox.Text = acq.mass.ToString("F6");
            CmPuRatioDateTimePicker.Value = cmpuratio.cm_pu_ratio_date;
            CmURatioDateTimePicker.Value = cmpuratio.cm_u_ratio_date;
        }
Пример #3
0
 public HVCalibrationParameters(AnalysisDefs.LMAcquireParams acq)
 {
     MinHV = acq.MinHV;
     MaxHV = acq.MaxHV;
     Step = acq.Step;
     HVDuration = acq.HVDuration;
     Delay = acq.Delay;
 }
Пример #4
0
        public IDDSelectPrimaryAM(AnalysisDefs.AnalysisMethods aam)
        {
            am = aam;
            InitializeComponent();
            EnableThoseWhomAreChosen();
            if (am.Normal == AnalysisMethod.None)
                am.Normal = am.GetFirstSelected();
            switch (am.Normal)
            {
                case AnalysisMethod.None:
                case AnalysisMethod.INCCNone:
                    break;
                case AnalysisMethod.CalibrationCurve:
                    CalibrationCurveRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownA:
                    KnownAlphaRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownM:
                    KnownMRadioButton.Checked = true;
                    break;
                case AnalysisMethod.Multiplicity:
                    MultiplicityRadioButton.Checked = true;
                    break;
                case AnalysisMethod.AddASource:
                    AddASourceRadioButton.Checked = true;
                    break;
                case AnalysisMethod.CuriumRatio:
                    CuriumRatioRadioButton.Checked = true;
                    break;
                case AnalysisMethod.TruncatedMultiplicity:
                    TruncatedMultiplicityRadioButton.Checked = true;
                    break;
            }

            if (am.Backup.IsNone() || am.Normal == am.Backup)
                am.Backup = am.GetSecondSelected();
            switch (am.Backup)
            {
                case AnalysisMethod.None:
                case AnalysisMethod.INCCNone:
                    break;
                case AnalysisMethod.CalibrationCurve:
                    BCalibrationCurveRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownA:
                    BKnownAlphaRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownM:
                    BKnownMRadioButton.Checked = true;
                    break;
                case AnalysisMethod.Multiplicity:
                    BMultiplicityRadioButton.Checked = true;
                    break;
                case AnalysisMethod.AddASource:
                    BAddASourceRadioButton.Checked = true;
                    break;
                case AnalysisMethod.CuriumRatio:
                    BCuriumRatioRadioButton.Checked = true;
                    break;
                case AnalysisMethod.TruncatedMultiplicity:
                    BTruncatedMultiplicityRadioButton.Checked = true;
                    break;
            }

            if (am.Auxiliary.IsNone() || am.Auxiliary == am.Backup)
                am.Auxiliary = am.GetThirdSelected();
            switch (am.Auxiliary)
            {
                case AnalysisMethod.None:
                case AnalysisMethod.INCCNone:
                    break;
                case AnalysisMethod.CalibrationCurve:
                    ACalibrationCurveRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownA:
                    AKnownAlphaRadioButton.Checked = true;
                    break;
                case AnalysisMethod.KnownM:
                    AKnownMRadioButton.Checked = true;
                    break;
                case AnalysisMethod.Multiplicity:
                    AMultiplicityRadioButton.Checked = true;
                    break;
                case AnalysisMethod.AddASource:
                    AAddASourceRadioButton.Checked = true;
                    break;
                case AnalysisMethod.CuriumRatio:
                    ACuriumRatioRadioButton.Checked = true;
                    break;
                case AnalysisMethod.TruncatedMultiplicity:
                    ATruncatedMultiplicityRadioButton.Checked = true;
                    break;
            }
        }
Пример #5
0
 public bool Transfer(AnalysisDefs.TimeInterval esp, EventSpacingResult esr)
 {
     if (esr == null)
         return true;
     bool res = true;
     try
     {
         TimeIntervalResult lesr = new TimeIntervalResult();  // the deep copy from ES to TI follows
         countresults.Add(esp, (object)lesr);
         lesr.TransferRawResult(esr);
     }
     catch (System.OutOfMemoryException e)
     {
         esp.reason = "TimeInterval transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87409, esp.reason);
     }
     return res;
 }
Пример #6
0
 public bool Transfer(AnalysisDefs.Rossi rap, RossiAlphaResult rar)
 {
     if (rar == null)
         return true;
     bool res = true;
     try
     {
         RossiAlphaResultExt ra = new RossiAlphaResultExt(rar.gateWidth, rar.gateData);   // deep copy via constructor menas no extra transfer function is needed
         countresults.Add(rap, ra);
     }
     catch (System.OutOfMemoryException e)
     {
         rap.reason = "Rossi transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87408, rap.reason);
     }
     return res;
 }
Пример #7
0
 public bool Transfer(AnalysisDefs.Feynman ryp, FeynmanResult fr)
 {
     if (fr == null)
         return true;
     bool res = true;
     try
     {
         FeynmanResultExt lfr = new FeynmanResultExt();
         countresults.Add(ryp, lfr);
         lfr.TransferRawResult(fr);
     }
     catch (System.OutOfMemoryException e)
     {
         ryp.reason = "Feynman transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87407, ryp.reason);
     }
     return res;
 }
Пример #8
0
 public bool Transfer(AnalysisDefs.Coincidence cop, CoincidenceResult cor)
 {
     if (cor == null)
         return true;
     bool res = true;
     try
     {
         CoincidenceMatrixResult cr = new CoincidenceMatrixResult(cor.RACoincidenceRate.Length); // check for equality to numchannels, should always be numXnum size
         countresults.Add(cop, cr);
         cr.TransferRawResult(cor);
     }
     catch (System.OutOfMemoryException e)
     {
         cop.reason = "Coincidence matrix transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87410, cop.reason);
     }
     return res;
 }
Пример #9
0
 public bool Transfer(AnalysisDefs.Multiplicity mup, MultiplicityResult mr, int idx)
 {
     if (mr == null)
         return true;
     bool res = true;
     try
     {
         SetQCStatus(mup, QCTestStatus.Pass);  // marked Pass at the outset 
         MultiplicityCountingRes lmcs = new MultiplicityCountingRes(mup.FA, idx);
         countresults.Add(mup, lmcs);
         lmcs.Totals = Totals;
         lmcs.TransferRawResult(mr);
         lmcs.TS = this.TS;
     }
     catch (System.OutOfMemoryException e)
     {
         mup.reason = "Multiplicity transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87406,  mup.reason);
     }
     return res;
 }
Пример #10
0
 public bool Transfer(AnalysisDefs.BaseRate ba, RateResult rates)
 {
     if (rates == null)
         return true;
     bool res = true;
     try
     {
         RatesResultEnhanced rrm = new RatesResultEnhanced(rates.numCompletedGates, ba.gateWidthTics);
         rrm.totaltime = new TimeSpan(this.TS.Ticks);
         countresults.Add(ba, rrm);
         rrm.TransferRawResult(rates);
     }
     catch (System.OutOfMemoryException e)
     {
         ba.reason = "BaseRate transfer " + e.Message;
         res = false;
         logger.TraceEvent(LogLevels.Error, 87405, ba.reason);
     }
     return res;
 }
Пример #11
0
        public void GenerateReport(AnalysisDefs.HVCalibrationParameters hvc, List<HVControl.HVStatus> HVSteps, DateTime time, String instId)
        {
            TabularReport t = new TabularReport(typeof(HVVals), NC.App.Loggers);  // default file output type is CSV
            try
            {
                t.CreateOutputFile(NC.App.Opstate.Measurement.AcquireState.lm.Results, instId + " HV " + time.ToString("yyyyMMddHHmmss"), null);

                t.rows = new Row[HVSteps.Count + 4 + 2];  // header, steps, space, header, current params, space, header, config
               // first, the column header
                int cols = System.Enum.GetValues(typeof(HVVals)).Length;
                int i = 0;

                // now for each hvcalib row
                for (i = 0; i < HVSteps.Count; i++)
                {
                    HVControl.HVStatus h = HVSteps[i];
                    Row row = CreateRow(h, i);
                    t.rows[i] = row;
                }

                // then do the current parameters
                t.rows[i++] = new Row();
                t.rows[i] = new Row(); t.rows[i++].GenFromEnum(typeof(HVCalibVals));
                t.rows[i++] = CreateRow(hvc, i);
                t.rows[i++] = new Row();

                // lastly, add the full software version state
                t.rows[i] = new Row(); t.rows[i++].Add(0, "Software application configuration details");
                Row[] temp = AnalysisDefs.SimpleReport.GenSoftwareConfigRows();
                Array.Resize(ref  t.rows, temp.Length + t.rows.Length + 2);
                Array.Copy(temp, 0, t.rows, i, temp.Length);

                t.CreateReport(3);

            }
            catch (Exception e)
            {
                ctrllog.TraceException(e);
            }
            finally
            {
                t.CloseOutputFile();
            }
        }
Пример #12
0
 public static Row CreateRow(AnalysisDefs.HVCalibrationParameters h, int i)
 {
     Row row = new Row();
     row.Add((int)HVCalibVals.MinHV, h.MinHV.ToString());
     row.Add((int)HVCalibVals.MaxHV, h.MaxHV.ToString());
     row.Add((int)HVCalibVals.DurationSeconds, h.HVDuration.ToString());
     row.Add((int)HVCalibVals.StepVolts, h.Step.ToString());
     row.Add((int)HVCalibVals.DelaySeconds, (h.DelayMS / 1000).ToString());
     return row;
 }