From 12142b93bfc0e77b715d347d2e66c92391fe1945 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 11 Oct 2018 13:58:54 +0300 Subject: [PATCH] Polinomial corrections to spectrum. --- .../inr/numass/scripts/temp/FSSEffect.groovy | 56 ------------------- .../inr/numass/scripts/temp/TestFXExit.groovy | 28 ---------- 2 files changed, 84 deletions(-) delete mode 100644 numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy delete mode 100644 numass-main/src/main/groovy/inr/numass/scripts/temp/TestFXExit.groovy diff --git a/numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy b/numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy deleted file mode 100644 index bb1f6d1e..00000000 --- a/numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy +++ /dev/null @@ -1,56 +0,0 @@ -package inr.numass.scripts.temp - -import hep.dataforge.context.Context -import hep.dataforge.context.Global -import hep.dataforge.grind.Grind -import hep.dataforge.grind.GrindShell -import hep.dataforge.grind.helpers.PlotHelper -import hep.dataforge.stat.fit.ParamSet -import hep.dataforge.values.Values -import inr.numass.NumassPlugin -import inr.numass.models.FSS -import inr.numass.models.sterile.NumassBeta - -Context ctx = Global.instance() -ctx.getPluginManager().load(FXPlotManager) -ctx.getPluginManager().load(NumassPlugin.class) - - -new GrindShell(ctx).eval { - def fssStream = getClass().getResourceAsStream("/data/FS.txt") - def fss = new FSS(fssStream) - - def beta = new NumassBeta(); - - def params = MetaMorph.morph(ParamSet, - Grind.buildMeta("params") { - E0(value: 18575, err: 0.1) - mnu2(value: 0, err: 0.01) - msterile2(value: 1000**2, err: 1) - U2(value: 0, err: 1e-3) - } - ) - - def fsBeta = { double eIn, Values set -> - double res = 0; - for (int i = 0; i < fss.size(); i++) { - res += fss.getP(i) * beta.value(fss.getE(i), eIn, set); - } - return res; - }; - - - def xs = (1..400).collect{18500 + it/4} - - def noFssPoints = xs.collect { beta.value(0,it, params) } - def fssPoints = xs.collect { fsBeta(it, params) } - - - (plots as PlotHelper).plot(xs,fssPoints,"FSS") - (plots as PlotHelper).plot(xs,noFssPoints,"noFSS") - - println "U\tFSS\tnoFSS" - for(i in 0..399){ - println "${xs[i]}\t${fssPoints[i]}\t${noFssPoints[i]}" - } -} \ No newline at end of file diff --git a/numass-main/src/main/groovy/inr/numass/scripts/temp/TestFXExit.groovy b/numass-main/src/main/groovy/inr/numass/scripts/temp/TestFXExit.groovy deleted file mode 100644 index 6ef98c8d..00000000 --- a/numass-main/src/main/groovy/inr/numass/scripts/temp/TestFXExit.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2017 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package inr.numass.scripts.temp - -import hep.dataforge.context.Context -import hep.dataforge.context.Global -import hep.dataforge.grind.GrindShell -import hep.dataforge.grind.helpers.PlotHelper - -Context ctx = Global.instance() - -new GrindShell(ctx).eval { - (plots as PlotHelper).plotFunction(0,1){Math.sin it} -} \ No newline at end of file