From dc27bbb659e61b8a6ba53b38a6ab93a3bd22f967 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 14 Jan 2018 22:29:03 +0300 Subject: [PATCH] MetaMorph redone --- .../kotlin/inr/numass/control/cryotemp/PKT8Display.kt | 4 ++-- .../kotlin/inr/numass/data/analyzers/TimeAnalyzer.kt | 2 +- .../groovy/inr/numass/scripts/FindExIonRatio.groovy | 2 +- .../TestExperimentalVariableLossSpectrum.groovy | 2 +- .../inr/numass/scripts/TheoreticalLossFunction.groovy | 2 +- .../groovy/inr/numass/scripts/temp/FSSEffect.groovy | 1 - .../groovy/inr/numass/scripts/temp/JoinSpectra.groovy | 6 +++--- .../hep/dataforge/plotfit/PlotFitResultAction.java | 4 +--- numass-main/src/main/java/inr/numass/Numass.java | 4 ++-- .../java/inr/numass/actions/MonitorCorrectAction.java | 6 ------ .../main/java/inr/numass/models/LossCalculator.java | 10 +++++----- numass-main/src/main/kotlin/inr/numass/NumassIO.kt | 2 +- .../main/kotlin/inr/numass/models/mc/BetaSampler.kt | 8 ++++---- .../kotlin/inr/numass/scripts/DifferentialSpectrum.kt | 4 ++-- .../main/kotlin/inr/numass/scripts/InversedChain.kt | 4 ++-- .../kotlin/inr/numass/scripts/InversedChainProto.kt | 4 ++-- .../src/main/kotlin/inr/numass/tasks/NumassTasks.kt | 2 +- .../inr/numass/models/TestNeLossParametrisation.java | 6 +++--- .../numass/models/TransmissionInterpolatorTest.java | 4 ++-- 19 files changed, 34 insertions(+), 43 deletions(-) diff --git a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8Display.kt b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8Display.kt index bcfcb2ac..f37a0db8 100644 --- a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8Display.kt +++ b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8Display.kt @@ -3,7 +3,7 @@ package inr.numass.control.cryotemp import hep.dataforge.control.devices.Sensor import hep.dataforge.control.measurements.Measurement import hep.dataforge.control.measurements.MeasurementListener -import hep.dataforge.description.DescriptorUtils +import hep.dataforge.description.Descriptors import hep.dataforge.fx.bindWindow import hep.dataforge.fx.dfIconView import hep.dataforge.fx.fragments.LogFragment @@ -142,7 +142,7 @@ class PKT8Display : DeviceDisplay(), MeasurementListener { private val plotFrame: PlotFrame by lazy { JFreeChartFrame(plotFrameMeta).apply { - plots.descriptor = DescriptorUtils.buildDescriptor(TimePlot::class.java) + plots.descriptor = Descriptors.buildDescriptor(TimePlot::class.java) PlotUtils.setXAxis(this, "timestamp", null, "time") } } diff --git a/numass-core/src/main/kotlin/inr/numass/data/analyzers/TimeAnalyzer.kt b/numass-core/src/main/kotlin/inr/numass/data/analyzers/TimeAnalyzer.kt index 5d02fd5d..afb9f574 100644 --- a/numass-core/src/main/kotlin/inr/numass/data/analyzers/TimeAnalyzer.kt +++ b/numass-core/src/main/kotlin/inr/numass/data/analyzers/TimeAnalyzer.kt @@ -145,7 +145,7 @@ class TimeAnalyzer @JvmOverloads constructor(private val processor: SignalProces if (cr < meta.getDouble("t0.minCR", 0.0)) { 0 } else { - Math.max(-1e9 / cr * Math.log(1.0 - fraction), meta.getDouble("t0.min", 0.0)!!).toInt() + Math.max(-1e9 / cr * Math.log(1.0 - fraction), meta.getDouble("t0.min", 0.0)).toInt() } } else { 0 diff --git a/numass-main/src/main/groovy/inr/numass/scripts/FindExIonRatio.groovy b/numass-main/src/main/groovy/inr/numass/scripts/FindExIonRatio.groovy index 214eb6de..86d426d7 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/FindExIonRatio.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/FindExIonRatio.groovy @@ -17,7 +17,7 @@ package inr.numass.scripts import hep.dataforge.maths.integration.UnivariateIntegrator import hep.dataforge.plots.PlotFrame -import hep.dataforge.plots.data.XYFunctionPlot +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.stat.fit.ParamSet import inr.numass.models.LossCalculator diff --git a/numass-main/src/main/groovy/inr/numass/scripts/TestExperimentalVariableLossSpectrum.groovy b/numass-main/src/main/groovy/inr/numass/scripts/TestExperimentalVariableLossSpectrum.groovy index 3189e937..e8736855 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/TestExperimentalVariableLossSpectrum.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/TestExperimentalVariableLossSpectrum.groovy @@ -17,7 +17,7 @@ package inr.numass.scripts import hep.dataforge.io.PrintFunction import hep.dataforge.maths.integration.UnivariateIntegrator -import hep.dataforge.plots.data.XYFunctionPlot +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.stat.fit.ParamSet import inr.numass.models.ExperimentalVariableLossSpectrum diff --git a/numass-main/src/main/groovy/inr/numass/scripts/TheoreticalLossFunction.groovy b/numass-main/src/main/groovy/inr/numass/scripts/TheoreticalLossFunction.groovy index be6dfcfd..72aea34c 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/TheoreticalLossFunction.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/TheoreticalLossFunction.groovy @@ -15,7 +15,7 @@ */ package inr.numass.scripts -import hep.dataforge.plots.data.XYFunctionPlot +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame import org.apache.commons.math3.analysis.UnivariateFunction 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 index e94fb6f5..bb1f6d1e 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/temp/FSSEffect.groovy @@ -6,7 +6,6 @@ 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.utils.MetaMorph import hep.dataforge.values.Values import inr.numass.NumassPlugin import inr.numass.models.FSS diff --git a/numass-main/src/main/groovy/inr/numass/scripts/temp/JoinSpectra.groovy b/numass-main/src/main/groovy/inr/numass/scripts/temp/JoinSpectra.groovy index 26a0fc64..d421271a 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/temp/JoinSpectra.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/temp/JoinSpectra.groovy @@ -2,7 +2,7 @@ package inr.numass.scripts.temp import hep.dataforge.context.Context import hep.dataforge.context.Global -import hep.dataforge.description.DescriptorUtils +import hep.dataforge.description.Descriptors import hep.dataforge.fx.plots.PlotManager import hep.dataforge.grind.Grind import hep.dataforge.grind.GrindShell @@ -63,7 +63,7 @@ new GrindShell(ctx).eval { PlotFrame frame = (plots as PlotHelper).getManager().getPlotFrame("test", "spectra") - frame.plots.setDescriptor(DescriptorUtils.buildDescriptor(DataPlot)) + frame.plots.setDescriptor(Descriptors.buildDescriptor(DataPlot)) frame.plots.configure(showErrors: false, showSymbol: false, showLine: true, connection: "step") joined.points.filter { it.voltage in [14000d, 15000d, 16000d, 17000d, 18000d] }.forEach { @@ -75,7 +75,7 @@ new GrindShell(ctx).eval { // def point = joined.points.find { it.voltage == 14000d } as NumassPoint // PlotFrame pointFrame = (plots as PlotHelper).getManager().getPlotFrame("test", "14000") // -// pointFrame.plots.setDescriptor(DescriptorUtils.buildDescriptor(DataPlot)) +// pointFrame.plots.setDescriptor(Descriptors.buildDescriptor(DataPlot)) // pointFrame.plots.configure(showErrors: false, showSymbol: false, showLine: true, connection: "step") // // [0, 5, 10,15,20].forEach{ diff --git a/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java b/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java index 8ed91410..022928ec 100644 --- a/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java +++ b/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java @@ -19,13 +19,12 @@ import hep.dataforge.actions.OneToOneAction; import hep.dataforge.context.Context; import hep.dataforge.description.NodeDef; import hep.dataforge.description.TypedActionDef; -import hep.dataforge.description.ValueDef; import hep.dataforge.meta.Laminate; import hep.dataforge.meta.Meta; import hep.dataforge.plots.PlotFrame; import hep.dataforge.plots.PlotUtils; +import hep.dataforge.plots.XYFunctionPlot; import hep.dataforge.plots.data.DataPlot; -import hep.dataforge.plots.data.XYFunctionPlot; import hep.dataforge.stat.fit.FitResult; import hep.dataforge.stat.fit.FitState; import hep.dataforge.stat.models.XYModel; @@ -41,7 +40,6 @@ import java.util.stream.StreamSupport; */ @TypedActionDef(name = "plotFit", info = "Plot fit result", inputType = FitState.class, outputType = FitState.class) @NodeDef(name = "adapter", info = "adapter for DataSet being fitted. By default is taken from model.") -@ValueDef(name = "plotTitle", def = "", info = "The title of the frame.") public class PlotFitResultAction extends OneToOneAction { @Override diff --git a/numass-main/src/main/java/inr/numass/Numass.java b/numass-main/src/main/java/inr/numass/Numass.java index 9451f045..7ac882d1 100644 --- a/numass-main/src/main/java/inr/numass/Numass.java +++ b/numass-main/src/main/java/inr/numass/Numass.java @@ -19,7 +19,7 @@ import hep.dataforge.actions.ActionManager; import hep.dataforge.context.Context; import hep.dataforge.context.Global; import hep.dataforge.description.ActionDescriptor; -import hep.dataforge.description.DescriptorUtils; +import hep.dataforge.description.Descriptors; import hep.dataforge.exceptions.DescriptorException; import hep.dataforge.io.markup.MarkupBuilder; import hep.dataforge.io.markup.MarkupUtils; @@ -48,7 +48,7 @@ public class Numass { .ln() .text("\t") .content( - MarkupUtils.INSTANCE.markupDescriptor(DescriptorUtils.buildDescriptor("method::hep.dataforge.data.DataManager.read")) + MarkupUtils.INSTANCE.markupDescriptor(Descriptors.buildDescriptor("method::hep.dataforge.data.DataManager.read")) ) .ln() .text("***Allowed actions***", "red") diff --git a/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java b/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java index 7e08e5a1..9a632437 100644 --- a/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java +++ b/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java @@ -18,7 +18,6 @@ package inr.numass.actions; import hep.dataforge.actions.OneToOneAction; import hep.dataforge.context.Context; import hep.dataforge.description.TypedActionDef; -import hep.dataforge.description.ValueDef; import hep.dataforge.exceptions.ContentException; import hep.dataforge.meta.Laminate; import hep.dataforge.meta.Meta; @@ -41,15 +40,10 @@ import java.util.Map.Entry; import java.util.TreeMap; import java.util.concurrent.CopyOnWriteArrayList; -import static hep.dataforge.values.ValueType.NUMBER; - /** * @author Darksnake */ @TypedActionDef(name = "monitor", inputType = Table.class, outputType = Table.class) -@ValueDef(name = "monitorPoint", type = {NUMBER}, required = true, info = "The Uset for monitor point") -@ValueDef(name = "monitorFile", info = "The outputfile for monitor points", def = "monitor.onComplete") -@ValueDef(name = "calculateRelative", info = "Calculate count rate relative to average monitor point", def = "false") public class MonitorCorrectAction extends OneToOneAction { //private static final String[] monitorNames = {"timestamp", NumassAnalyzer.COUNT_KEY, NumassAnalyzer.COUNT_RATE_KEY, NumassAnalyzer.COUNT_RATE_KEY}; diff --git a/numass-main/src/main/java/inr/numass/models/LossCalculator.java b/numass-main/src/main/java/inr/numass/models/LossCalculator.java index a9e0ba0a..88e01c3d 100644 --- a/numass-main/src/main/java/inr/numass/models/LossCalculator.java +++ b/numass-main/src/main/java/inr/numass/models/LossCalculator.java @@ -19,7 +19,7 @@ import hep.dataforge.maths.functions.FunctionCaching; import hep.dataforge.maths.integration.GaussRuleIntegrator; import hep.dataforge.maths.integration.UnivariateIntegrator; import hep.dataforge.plots.PlotFrame; -import hep.dataforge.plots.data.XYFunctionPlot; +import hep.dataforge.plots.XYFunctionPlot; import hep.dataforge.utils.Misc; import hep.dataforge.values.Values; import org.apache.commons.math3.analysis.BivariateFunction; @@ -180,12 +180,12 @@ public class LossCalculator { final LossCalculator loss = LossCalculator.instance; final List probs = loss.getGunLossProbabilities(set.getDouble("X")); UnivariateFunction single = (double e) -> probs.get(1) * scatterFunction.value(e); - frame.add(XYFunctionPlot.plotFunction("Single scattering", 0, 100, 1000, single::value)); + frame.add(XYFunctionPlot.Companion.plot("Single scattering", 0, 100, 1000, single::value)); for (int i = 2; i < probs.size(); i++) { final int j = i; UnivariateFunction scatter = (double e) -> probs.get(j) * loss.getLossValue(j, e, 0d); - frame.add(XYFunctionPlot.plotFunction(j + " scattering", 0, 100, 1000, scatter::value)); + frame.add(XYFunctionPlot.Companion.plot(j + " scattering", 0, 100, 1000, scatter::value)); } UnivariateFunction total = (eps) -> { @@ -199,11 +199,11 @@ public class LossCalculator { return sum; }; - frame.add(XYFunctionPlot.plotFunction("Total loss", 0, 100, 1000, total::value)); + frame.add(XYFunctionPlot.Companion.plot("Total loss", 0, 100, 1000, total::value)); } else { - frame.add(XYFunctionPlot.plotFunction("Differential crosssection", 0, 100, 2000, scatterFunction::value)); + frame.add(XYFunctionPlot.Companion.plot("Differential crosssection", 0, 100, 2000, scatterFunction::value)); } } diff --git a/numass-main/src/main/kotlin/inr/numass/NumassIO.kt b/numass-main/src/main/kotlin/inr/numass/NumassIO.kt index 7aea5893..f8ab9f05 100644 --- a/numass-main/src/main/kotlin/inr/numass/NumassIO.kt +++ b/numass-main/src/main/kotlin/inr/numass/NumassIO.kt @@ -27,8 +27,8 @@ import hep.dataforge.io.IOManager import hep.dataforge.meta.Meta import hep.dataforge.names.Name import hep.dataforge.plots.PlotUtils +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.data.DataPlot -import hep.dataforge.plots.data.XYFunctionPlot import hep.dataforge.stat.fit.FitResult import hep.dataforge.stat.models.XYModel import hep.dataforge.tables.Adapters diff --git a/numass-main/src/main/kotlin/inr/numass/models/mc/BetaSampler.kt b/numass-main/src/main/kotlin/inr/numass/models/mc/BetaSampler.kt index 8d1ca7de..c1f2e779 100644 --- a/numass-main/src/main/kotlin/inr/numass/models/mc/BetaSampler.kt +++ b/numass-main/src/main/kotlin/inr/numass/models/mc/BetaSampler.kt @@ -4,7 +4,7 @@ import hep.dataforge.fx.plots.PlotManager import hep.dataforge.kodex.buildMeta import hep.dataforge.kodex.global import hep.dataforge.maths.chain.Chain -import hep.dataforge.plots.data.XYFunctionPlot +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.stat.PolynomialDistribution import hep.dataforge.stat.fit.ParamSet import inr.numass.NumassPlugin @@ -37,14 +37,14 @@ fun main(args: Array) { val sp = SterileNeutrinoSpectrum(global, meta) - val spectrumPlot = XYFunctionPlot.plotFunction("spectrum", 14000.0, 18600.0, 500) { + val spectrumPlot = XYFunctionPlot.plot("spectrum", 14000.0, 18600.0, 500) { sp.value(it, allPars) } val distribution = PolynomialDistribution(0.0, 5000.0, 3.0); - val distributionPlot = XYFunctionPlot.plotFunction("distribution", 14000.0, 18500.0, 500) { - 50*distribution.density(18575.0 - it) + val distributionPlot = XYFunctionPlot.plot("distribution", 14000.0, 18500.0, 500) { + 50*distribution.density(18600.0 - it) } pm.getPlotFrame("beta").apply { diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/DifferentialSpectrum.kt b/numass-main/src/main/kotlin/inr/numass/scripts/DifferentialSpectrum.kt index ff031cca..73d3428d 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/DifferentialSpectrum.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/DifferentialSpectrum.kt @@ -16,7 +16,7 @@ package inr.numass.scripts -import hep.dataforge.description.DescriptorUtils +import hep.dataforge.description.Descriptors import hep.dataforge.fx.plots.PlotManager import hep.dataforge.kodex.buildContext import hep.dataforge.kodex.buildMeta @@ -61,7 +61,7 @@ fun main(args: Array) { val plots = context.getFeature(PlotManager::class.java) val frame = plots.getPlotFrame("differential").apply { - this.plots.descriptor = DescriptorUtils.buildDescriptor(DataPlot::class) + this.plots.descriptor = Descriptors.buildDescriptor(DataPlot::class) this.plots.configureValue("showLine", true) } diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt index ddf0c647..dac1c2a5 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt @@ -16,7 +16,7 @@ package inr.numass.scripts -import hep.dataforge.description.DescriptorUtils +import hep.dataforge.description.Descriptors import hep.dataforge.fx.plots.PlotManager import hep.dataforge.kodex.buildContext import hep.dataforge.kodex.buildMeta @@ -68,7 +68,7 @@ fun main(args: Array) { for (hv in arrayOf(14000.0, 14500.0, 15000.0, 15500.0, 16050.0)) { val frame = plots.getPlotFrame("integral[$hv]").apply { - this.plots.descriptor = DescriptorUtils.buildDescriptor(DataPlot::class) + this.plots.descriptor = Descriptors.buildDescriptor(DataPlot::class) this.plots.configureValue("showLine", true) } diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt index 4071ab04..5d43386e 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt @@ -16,7 +16,7 @@ package inr.numass.scripts -import hep.dataforge.description.DescriptorUtils +import hep.dataforge.description.Descriptors import hep.dataforge.fx.plots.PlotManager import hep.dataforge.kodex.buildContext import hep.dataforge.kodex.buildMeta @@ -50,7 +50,7 @@ fun main(args: Array) { val point = ProtoNumassPoint.readFile(Paths.get("D:\\Work\\Numass\\data\\2017_05_frames\\Fill_3_events\\set_33\\p36(30s)(HV1=17000).df")) val frame = plots.getPlotFrame("integral").apply { - this.plots.descriptor = DescriptorUtils.buildDescriptor(DataPlot::class) + this.plots.descriptor = Descriptors.buildDescriptor(DataPlot::class) this.plots.configureValue("showLine", true) } diff --git a/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt b/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt index 4129cf57..d4aef9ae 100644 --- a/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt +++ b/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt @@ -14,8 +14,8 @@ import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaUtils import hep.dataforge.plots.PlotFrame import hep.dataforge.plots.PlotUtils +import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.data.DataPlot -import hep.dataforge.plots.data.XYFunctionPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.stat.fit.FitHelper import hep.dataforge.stat.fit.FitResult diff --git a/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java b/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java index 44cd5bef..c539c5ba 100644 --- a/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java +++ b/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java @@ -17,7 +17,7 @@ package inr.numass.models; import hep.dataforge.maths.integration.GaussRuleIntegrator; import hep.dataforge.plots.PlotFrame; -import hep.dataforge.plots.data.XYFunctionPlot; +import hep.dataforge.plots.XYFunctionPlot; import inr.numass.NumassPluginKt; import org.apache.commons.math3.analysis.UnivariateFunction; @@ -41,8 +41,8 @@ public class TestNeLossParametrisation { System.out.println(norm); - frame.add(XYFunctionPlot.plotFunction("old", 0, 30, 300, oldFunction::value)); - frame.add(XYFunctionPlot.plotFunction("new", 0, 30, 300, newFunction::value)); + frame.add(XYFunctionPlot.Companion.plot("old", 0, 30, 300, oldFunction::value)); + frame.add(XYFunctionPlot.Companion.plot("new", 0, 30, 300, newFunction::value)); } public static UnivariateFunction getSingleScatterFunction( diff --git a/numass-main/src/test/java/inr/numass/models/TransmissionInterpolatorTest.java b/numass-main/src/test/java/inr/numass/models/TransmissionInterpolatorTest.java index dea75d03..15ddde55 100644 --- a/numass-main/src/test/java/inr/numass/models/TransmissionInterpolatorTest.java +++ b/numass-main/src/test/java/inr/numass/models/TransmissionInterpolatorTest.java @@ -16,8 +16,8 @@ package inr.numass.models; import hep.dataforge.context.Global; +import hep.dataforge.plots.XYFunctionPlot; import hep.dataforge.plots.data.DataPlot; -import hep.dataforge.plots.data.XYFunctionPlot; import hep.dataforge.plots.jfreechart.JFreeChartFrame; import inr.numass.NumassPluginKt; @@ -33,7 +33,7 @@ public class TransmissionInterpolatorTest { TransmissionInterpolator interpolator = TransmissionInterpolator.fromFile(Global.instance(), "d:\\sterile-new\\loss2014-11\\.dataforge\\merge\\empty_sum.onComplete", "Uset", "CR", 15, 0.8, 19002d); frame.add(DataPlot.plot("data", interpolator.getX(), interpolator.getY())); - frame.add(XYFunctionPlot.plotFunction("interpolated", interpolator.getXmin(), interpolator.getXmax(), 2000, interpolator::value)); + frame.add(XYFunctionPlot.Companion.plot("interpolated", interpolator.getXmin(), interpolator.getXmax(), 2000, interpolator::value)); // PrintFunction.printFuntionSimple(new PrintWriter(System.onComplete), interpolator, interpolator.getXmin(), interpolator.getXmax(), 500); }