bool PrepList(string DetectorId) { mlist.RemoveAll(MatchingSwipeLeft); // cull those without matching attributes if (mlist.Count == 0) { string msg = string.Format("No '{0}' {1} {2} measurements found", Material, AnalysisMethod.FullName(), mopt.PrintName()); MessageBox.Show(msg, "Verification measurements", MessageBoxButtons.OK); N.App.Loggers.Logger(LMLoggers.AppSection.Control).TraceEvent(LogLevels.Warning, 3363, msg); return(false); } LoadList(); return(true); }
public jigglypuff(AnalysisMethod am) { a = am; s = a.FullName(); }
void ApplyCoefficients(INCCAnalysisParams.CurveEquationVals coeff, CalibrationCurveList cclist) { INCCSelector sel = new INCCSelector(det.Id.DetectorId, Material); AnalysisMethods lam; bool found = N.App.DB.DetectorMaterialAnalysisMethods.TryGetValue(sel, out lam); if (!found) { lam = new AnalysisMethods(sel); } if (!lam.HasMethod(AnalysisMethod)) // create it from scratch here ???? { MessageBox.Show(string.Format("{0} method not specified for detector {1} and material {2}", AnalysisMethod.FullName(), det.Id.DetectorId, Material), "Coefficient File Ingester", MessageBoxButtons.OK); return; } INCCAnalysisParams.INCCMethodDescriptor imd = lam.GetMethodParameters(AnalysisMethod); switch (AnalysisMethod) { case AnalysisMethod.CalibrationCurve: INCCAnalysisParams.cal_curve_rec c = (INCCAnalysisParams.cal_curve_rec)imd; CopyCoefficients(coeff, c.cev); c.cev.cal_curve_equation = CurveEquation; c.cev.lower_mass_limit = cclist.LowerMassLimit; c.cev.upper_mass_limit = cclist.UpperMassLimit; c.dcl_mass = cclist.MassAsArray; c.doubles = cclist.DoublesAsArray; break; case AnalysisMethod.KnownA: INCCAnalysisParams.known_alpha_rec ka = (INCCAnalysisParams.known_alpha_rec)imd; CopyCoefficients(coeff, ka.cev); ka.cev.cal_curve_equation = CurveEquation; ka.cev.lower_mass_limit = cclist.LowerMassLimit; ka.cev.upper_mass_limit = cclist.UpperMassLimit; ka.dcl_mass = cclist.MassAsArray; ka.doubles = cclist.DoublesAsArray; break; case AnalysisMethod.AddASource: INCCAnalysisParams.add_a_source_rec aas = (INCCAnalysisParams.add_a_source_rec)imd; CopyCoefficients(coeff, aas.cev); aas.cev.cal_curve_equation = CurveEquation; aas.cev.lower_mass_limit = cclist.LowerMassLimit; aas.cev.upper_mass_limit = cclist.UpperMassLimit; aas.dcl_mass = cclist.MassAsArray; aas.doubles = cclist.DoublesAsArray; break; case AnalysisMethod.Active: INCCAnalysisParams.active_rec ac = (INCCAnalysisParams.active_rec)imd; CopyCoefficients(coeff, ac.cev); ac.cev.cal_curve_equation = CurveEquation; ac.cev.lower_mass_limit = cclist.LowerMassLimit; ac.cev.upper_mass_limit = cclist.UpperMassLimit; ac.dcl_mass = cclist.MassAsArray; ac.doubles = cclist.DoublesAsArray; break; } imd.modified = true; // ok save it now N.App.DB.UpdateAnalysisMethod(sel, lam); // flush changes on internal map to the DB MessageBox.Show(string.Format("Calibration data for analysis method {0} and material type {1} successfully stored in the database", det.Id.DetectorId, Material), "Coefficient File Ingester", MessageBoxButtons.OK); }
public jigglypuff(AnalysisMethod am) { a = am; s = a.FullName(); }
public void SetMatAlgLabel(string mtl, AnalysisMethod am) { Material = mtl; AnalysisMethod = am; MtlAlg.Text = Material + ", " + AnalysisMethod.FullName(); }
public void SetMatAlgLabel(string mtl, AnalysisMethod am) { Material = mtl; AnalysisMethod = am; MtlAlg.Text = Material + ", " + AnalysisMethod.FullName(); }