From 75a27abc79336eb70c252d5b4071f34801e620d2 Mon Sep 17 00:00:00 2001 From: darksnake Date: Thu, 6 Apr 2017 22:01:08 +0300 Subject: [PATCH] Fix fit plugin resolution --- .../src/main/groovy/inr/numass/scripts/SimulatePileup.groovy | 4 ++-- numass-main/src/main/java/inr/numass/NumassPlugin.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy index 3b513752..4c19ee6f 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy @@ -54,7 +54,7 @@ List pileup = new ArrayList<>(); lowerChannel = 400; upperChannel = 1800; -PileUpSimulator buildSimulator(NMPoint point, double cr, NMPoint reference = null, boolean extrapolate = false, double scale = 1d) { +PileUpSimulator buildSimulator(NMPoint point, double cr, NMPoint reference = null, boolean extrapolate = true, double scale = 1d) { def cfg = Grind.buildMeta(cr: cr) { pulser(mean: 3450, sigma: 86.45, freq: 66.43) } @@ -63,7 +63,7 @@ PileUpSimulator buildSimulator(NMPoint point, double cr, NMPoint reference = nul if (extrapolate) { double[] chanels = new double[RawNMPoint.MAX_CHANEL]; double[] values = new double[RawNMPoint.MAX_CHANEL]; - DataPoint fitResult = new UnderflowCorrection().fitPoint(point, 400, 600, 1800, 20); + DataPoint fitResult = new UnderflowCorrection().fitPoint(point, 400, 600, 1800, 20); numa def amp = fitResult.getDouble("amp") def sigma = fitResult.getDouble("expConst") diff --git a/numass-main/src/main/java/inr/numass/NumassPlugin.java b/numass-main/src/main/java/inr/numass/NumassPlugin.java index c5fec8d8..c8aabb3b 100644 --- a/numass-main/src/main/java/inr/numass/NumassPlugin.java +++ b/numass-main/src/main/java/inr/numass/NumassPlugin.java @@ -73,7 +73,7 @@ public class NumassPlugin extends BasicPlugin { // StorageManager.buildFrom(context); super.attach(context); context.setIO(new NumassIO()); - FitManager fm = context.provide("fitting", FitManager.class); + FitManager fm = context.getFeature(FitManager.class); loadModels(fm.getModelManager()); loadMath(MathPlugin.buildFrom(context));