public void InitializeResultsSummarizers() { if (logger != null) { logger.TraceEvent(LogLevels.Verbose, 4042, "Initialize results summarizers (countresults)"); } countresults.Clear(); try { int idx = 0; foreach (BaseRate b in (ap.GetBases())) { countresults.Add(b, new RatesResultEnhanced(1, b.gateWidthTics)); } idx = 0; foreach (Multiplicity muon in (ap.GetMults(FAType.FAOn))) { countresults.Add(muon, new MultiplicityCountingRes(FAType.FAOn, idx)); idx++; } idx = 0; foreach (Multiplicity muoff in (ap.GetMults(FAType.FAOff))) { countresults.Add(muoff, new MultiplicityCountingRes(FAType.FAOff, idx)); idx++; } foreach (Rossi ro in (ap.GetRossis())) { countresults.Add(ro, new RossiAlphaResultExt(10, new uint[RawAnalysisProperties.numRAGatesPerWindow])); } foreach (Feynman fy in (ap.GetFeynmans())) { countresults.Add(fy, new FeynmanResultExt()); } foreach (TimeInterval ti in (ap.GetTimeIntervals())) { TimeIntervalResult tir = new TimeIntervalResult(); tir.timeIntervalHistogram = new uint[RawAnalysisProperties.maxEventSpacing + 1]; // alloc the entire possible range, but use maxIndexOfNonzeroHistogramEntry upon output countresults.Add(ti, tir); } foreach (Coincidence co in ap.GetCoincidences()) { CoincidenceMatrixResult cor = new CoincidenceMatrixResult(RawAnalysisProperties.ChannelCount); cor.coincidenceDeadDelay = co.SR.predelay; cor.accidentalsDelay = co.AccidentalsGateDelayInTics; cor.coincidenceGateWidth = co.SR.gateLength; cor.isSlowBackground = true; // see constructor in LMRawAnalysis.CoincidenceAnalysisSlowBackGround.GetResult() countresults.Add(co, cor); } } catch (Exception ex) { if (logger != null) { logger.TraceEvent(LogLevels.Error, 4041, "Unable to create counting analyzers: " + ex.Message); } } }
public bool Transfer(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 (OutOfMemoryException e) { esp.reason = "TimeInterval transfer " + e.Message; res = false; logger?.TraceEvent(LogLevels.Error, 87409, esp.reason); } return(res); }
public bool Transfer(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 (OutOfMemoryException e) { esp.reason = "TimeInterval transfer " + e.Message; res = false; logger.TraceEvent(LogLevels.Error, 87409, esp.reason); } return res; }
Row[] GenTimeIntervalRows(TimeIntervalResult esr, Cycle c = null) { Row[] rows = new Row[3]; rows[0] = GenTimeIntervalParamsRow(esr, c); Row[] rows2 = GenTimeIntervalDataRows(esr, c); rows[1] = rows2[0]; rows[2] = rows2[1]; return rows; }
Row GenTimeIntervalParamsRow(TimeIntervalResult esr, Cycle c = null) { Row row = new Row(); int shift = 0; if (c != null) { row.Add(0, c.seq.ToString()); shift = 1; } row.Add((int)TimeInterval.GateWidth + shift, esr.gateWidthInTics.ToString()); row.Add((int)TimeInterval.Bins + shift, esr.maxIndexOfNonzeroHistogramEntry.ToString()); return row; }
Row[] GenTimeIntervalDataRows(TimeIntervalResult tir, Cycle c = null) { Row[] rows = { new Row(), new Row() }; int shift = 0; if (c != null) // add the cycle label column { rows[0].Add(0, c.seq.ToString()); rows[1].Add(0, c.seq.ToString()); shift = 1; } for (int i = 0; i <= tir.maxIndexOfNonzeroHistogramEntry; i++) { if (tir.timeIntervalHistogram[i] == 0) continue; rows[0].Add(i + shift, i.ToString()); rows[1].Add(i + shift, tir.timeIntervalHistogram[i].ToString()); } return rows; }