diff --git a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt index a9bd51d5..c8e0ce7d 100644 --- a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt +++ b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt @@ -8,7 +8,7 @@ import hep.dataforge.fx.fragments.FragmentWindow import hep.dataforge.fx.fragments.LogFragment import hep.dataforge.meta.Meta import hep.dataforge.plots.PlotUtils -import hep.dataforge.plots.data.TimePlottable +import hep.dataforge.plots.data.TimePlot import hep.dataforge.plots.data.TimePlottableGroup import hep.dataforge.plots.fx.FXPlotFrame import hep.dataforge.plots.fx.PlotContainer @@ -182,7 +182,7 @@ class PKT8ViewConnection : DeviceViewConnection(), MeasurementListen .filter { channel -> !plottables.has(channel.name) } .forEachOrdered { channel -> //plot config from device configuration - val plottable = TimePlottable(channel.name) + val plottable = TimePlot(channel.name) plottable.configure(channel.meta()) plottables.add(plottable) plotFrame.add(plottable) diff --git a/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspViewConnection.kt b/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspViewConnection.kt index 34206b24..78779266 100644 --- a/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspViewConnection.kt +++ b/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspViewConnection.kt @@ -24,7 +24,7 @@ import hep.dataforge.fx.fragments.LogFragment import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.plots.PlotUtils -import hep.dataforge.plots.data.TimePlottable +import hep.dataforge.plots.data.TimePlot import hep.dataforge.plots.data.TimePlottableGroup import hep.dataforge.plots.fx.FXPlotFrame import hep.dataforge.plots.fx.PlotContainer @@ -93,7 +93,7 @@ class MspViewConnection() : DeviceViewConnection(), DeviceListener, N for (peakMeta in plotFrameMeta.getMetaList("peakJump.peak")) { val mass = peakMeta.getString("mass") if (!this.has(mass)) { - val newPlottable = TimePlottable(mass, mass) + val newPlottable = TimePlot(mass, mass) newPlottable.configure(peakMeta) newPlottable.setMaxItems(1000) newPlottable.setPrefItems(400) diff --git a/numass-control/src/main/kotlin/inr/numass/control/FXExtensions.kt b/numass-control/src/main/kotlin/inr/numass/control/FXExtensions.kt index f75f2e84..d8b9175a 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/FXExtensions.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/FXExtensions.kt @@ -1,8 +1,8 @@ package inr.numass.control import hep.dataforge.kodex.KMetaBuilder +import hep.dataforge.plots.Plot import hep.dataforge.plots.PlotFrame -import hep.dataforge.plots.Plottable import hep.dataforge.plots.fx.PlotContainer import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.values.Value @@ -139,7 +139,7 @@ fun EventTarget.switch(text: String = "", op: (ToggleSwitch.() -> Unit)? = null) /** * Add plot */ -fun BorderPane.plot(plottables: Iterable = Collections.emptyList(), metaTransform: (KMetaBuilder.() -> Unit)? = null): PlotFrame { +fun BorderPane.plot(plottables: Iterable = Collections.emptyList(), metaTransform: (KMetaBuilder.() -> Unit)? = null): PlotFrame { val meta = KMetaBuilder("plotFrame"); metaTransform?.invoke(meta) val plot = JFreeChartFrame(meta) diff --git a/numass-control/vac/src/main/kotlin/inr/numass/control/readvac/VacCollectorViewConnection.kt b/numass-control/vac/src/main/kotlin/inr/numass/control/readvac/VacCollectorViewConnection.kt index 72d5e386..bd2c148c 100644 --- a/numass-control/vac/src/main/kotlin/inr/numass/control/readvac/VacCollectorViewConnection.kt +++ b/numass-control/vac/src/main/kotlin/inr/numass/control/readvac/VacCollectorViewConnection.kt @@ -12,7 +12,7 @@ import hep.dataforge.control.measurements.Measurement import hep.dataforge.control.measurements.MeasurementListener import hep.dataforge.fx.fragments.FragmentWindow import hep.dataforge.fx.fragments.LogFragment -import hep.dataforge.plots.data.TimePlottable +import hep.dataforge.plots.data.TimePlot import hep.dataforge.plots.data.TimePlottableGroup import hep.dataforge.values.Value import inr.numass.control.DeviceViewConnection @@ -67,7 +67,7 @@ class VacCollectorViewConnection : DeviceViewConnection() { private val plottables = TimePlottableGroup().apply { viewList.forEach { - val plot = TimePlottable(it.getTitle(), it.device.name) + val plot = TimePlot(it.getTitle(), it.device.name) plot.configure(it.device.meta()) add(plot) } 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 e1fbc9f5..f492903d 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.PlottableXYFunction +import hep.dataforge.plots.data.PlotXYFunction import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.stat.fit.ParamSet import inr.numass.models.LossCalculator @@ -37,7 +37,7 @@ ParamSet params = new ParamSet() UnivariateFunction scatterFunction = LossCalculator.getSingleScatterFunction(params); PlotFrame frame = JFreeChartFrame.drawFrame("Differential scatter function", null); -frame.add(PlottableXYFunction.plotFunction("differential", scatterFunction, 0, 100, 400)); +frame.add(PlotXYFunction.plotFunction("differential", scatterFunction, 0, 100, 400)); UnivariateIntegrator integrator = NumassContext.defaultIntegrator; @@ -88,7 +88,7 @@ UnivariateFunction integral = {double u -> } -frame.add(PlottableXYFunction.plotFunction("integral", integral, 0, 100, 800)); +frame.add(PlotXYFunction.plotFunction("integral", integral, 0, 100, 800)); BisectionSolver solver = new BisectionSolver(1e-3); 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 3b9790fc..a4ac96c3 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.PlottableXYFunction +import hep.dataforge.plots.data.PlotXYFunction import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.stat.fit.ParamSet import inr.numass.models.ExperimentalVariableLossSpectrum @@ -45,17 +45,17 @@ JFreeChartFrame frame = JFreeChartFrame.drawFrame("Experimental Loss Test", null UnivariateIntegrator integrator = NumassContext.defaultIntegrator UnivariateFunction exFunc = lsp.excitation(params.getValue("exPos"), params.getValue("exW")); -frame.add(PlottableXYFunction.plotFunction("ex", exFunc, 0d, 50d, 500)); +frame.add(PlotXYFunction.plotFunction("ex", exFunc, 0d, 50d, 500)); println "excitation norm factor " + integrator.integrate(0, 50, exFunc) UnivariateFunction ionFunc = lsp.ionization(params.getValue("ionPos"), params.getValue("ionW")); -frame.add(PlottableXYFunction.plotFunction("ion", ionFunc, 0d, 50d, 500)); +frame.add(PlotXYFunction.plotFunction("ion", ionFunc, 0d, 50d, 500)); println "ionization norm factor " + integrator.integrate(0, 200, ionFunc) UnivariateFunction sumFunc = lsp.singleScatterFunction(params); -frame.add(PlottableXYFunction.plotFunction("sum", sumFunc, 0d, 50d, 500)); +frame.add(PlotXYFunction.plotFunction("sum", sumFunc, 0d, 50d, 500)); println "sum norm factor " + integrator.integrate(0, 100, sumFunc) @@ -65,4 +65,4 @@ PrintFunction.printFunctionSimple(new PrintWriter(System.out), sumFunc, 0d, 50d, JFreeChartFrame integerFrame = JFreeChartFrame.drawFrame("Experimental Loss Test", null); UnivariateFunction integr = { d-> lsp.value(d,params)} -integerFrame.add(PlottableXYFunction.plotFunction("integr", integr, 18950d, 19005d, 500)); \ No newline at end of file +integerFrame.add(PlotXYFunction.plotFunction("integr", integr, 18950d, 19005d, 500)); \ No newline at end of file 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 c91f5841..012083b9 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.PlottableXYFunction +import hep.dataforge.plots.data.PlotXYFunction import hep.dataforge.plots.jfreechart.JFreeChartFrame import org.apache.commons.math3.analysis.UnivariateFunction @@ -43,4 +43,4 @@ UnivariateFunction excitation = excitationSpectrum(lines,0.08) JFreeChartFrame frame = JFreeChartFrame.drawFrame("theoretical loss spectrum", null); -frame.add(PlottableXYFunction.plotFunction("excitation", excitation, 0d, 20d, 500)); \ No newline at end of file +frame.add(PlotXYFunction.plotFunction("excitation", excitation, 0d, 20d, 500)); \ No newline at end of file diff --git a/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy b/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy index 6a0ae9d0..d1e035fa 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy @@ -14,7 +14,7 @@ import hep.dataforge.grind.GrindShell import hep.dataforge.grind.helpers.PlotHelper import hep.dataforge.io.ColumnedDataWriter import hep.dataforge.meta.Meta -import hep.dataforge.plots.data.PlottableData +import hep.dataforge.plots.data.PlotData import hep.dataforge.plots.data.PlottableGroup import hep.dataforge.plots.fx.FXPlotManager import hep.dataforge.tables.Table @@ -64,11 +64,11 @@ shell.eval { //Showing selected points def showPoints = { Map points, int binning = 20, int loChannel = 300, int upChannel = 2000 -> - PlottableGroup plotGroup = new PlottableGroup<>(); + PlottableGroup plotGroup = new PlottableGroup<>(); def adapter = new XYAdapter(CHANNEL_KEY, COUNT_RATE_KEY) points.each { plotGroup.add( - PlottableData.plot( + PlotData.plot( it.key as String, adapter, NumassDataUtils.spectrumWithBinning(it.value as Table, binning) 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 eba12cba..dd54f7d0 100644 --- a/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java +++ b/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java @@ -24,8 +24,8 @@ import hep.dataforge.meta.Laminate; import hep.dataforge.meta.Meta; import hep.dataforge.plots.PlotFrame; import hep.dataforge.plots.PlotUtils; -import hep.dataforge.plots.data.PlottableData; -import hep.dataforge.plots.data.PlottableXYFunction; +import hep.dataforge.plots.data.PlotData; +import hep.dataforge.plots.data.PlotXYFunction; import hep.dataforge.stat.fit.FitResult; import hep.dataforge.stat.fit.FitState; import hep.dataforge.stat.models.XYModel; @@ -69,7 +69,7 @@ public class PlotFitResultAction extends OneToOneAction { PlotFrame frame = PlotUtils.getPlotManager(context) .getPlotFrame(getName(), name, metaData.getMeta("plot", Meta.empty())); - PlottableXYFunction fit = new PlottableXYFunction("fit"); + PlotXYFunction fit = new PlotXYFunction("fit"); fit.setDensity(100, false); fit.setSmoothing(true); // ensuring all data points are calculated explicitly @@ -78,7 +78,7 @@ public class PlotFitResultAction extends OneToOneAction { frame.add(fit); - frame.add(PlottableData.plot("data", adapter, data)); + frame.add(PlotData.plot("data", adapter, data)); return input; } 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 3101b989..6de229e8 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.PlottableXYFunction; +import hep.dataforge.plots.data.PlotXYFunction; 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(PlottableXYFunction.plotFunction("Single scattering", single::value, 0, 100, 1000)); + frame.add(PlotXYFunction.plotFunction("Single scattering", single::value, 0, 100, 1000)); 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(PlottableXYFunction.plotFunction(j + " scattering", scatter::value, 0, 100, 1000)); + frame.add(PlotXYFunction.plotFunction(j + " scattering", scatter::value, 0, 100, 1000)); } UnivariateFunction total = (eps) -> { @@ -199,11 +199,11 @@ public class LossCalculator { return sum; }; - frame.add(PlottableXYFunction.plotFunction("Total loss", total::value, 0, 100, 1000)); + frame.add(PlotXYFunction.plotFunction("Total loss", total::value, 0, 100, 1000)); } else { - frame.add(PlottableXYFunction.plotFunction("Differential crosssection", scatterFunction::value, 0, 100, 2000)); + frame.add(PlotXYFunction.plotFunction("Differential crosssection", scatterFunction::value, 0, 100, 2000)); } } diff --git a/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzedAction.kt b/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzedAction.kt index 485fe46e..be2c9605 100644 --- a/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzedAction.kt +++ b/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzedAction.kt @@ -8,7 +8,7 @@ import hep.dataforge.kodex.configure import hep.dataforge.maths.histogram.UnivariateHistogram import hep.dataforge.meta.Laminate import hep.dataforge.plots.PlotManager -import hep.dataforge.plots.data.PlottableData +import hep.dataforge.plots.data.PlotData import hep.dataforge.tables.Table import hep.dataforge.tables.ValueMap import hep.dataforge.values.ValueType @@ -75,7 +75,7 @@ class TimeAnalyzedAction : OneToOneAction() { } } - histPlot.add(PlottableData(name) + histPlot.add(PlotData(name) .configure { "showLine" to true "showSymbol" to false @@ -116,7 +116,7 @@ class TimeAnalyzedAction : OneToOneAction() { } pm.getPlotFrame(getName(), "stat-method").add( - PlottableData(name).configure { + PlotData(name).configure { "showLine" to true "thickness" to 4 "title" to "${name}_${input.voltage}" 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 d41c82ab..dc0b1e0c 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.PlottableXYFunction; +import hep.dataforge.plots.data.PlotXYFunction; import inr.numass.NumassPlugin; import org.apache.commons.math3.analysis.UnivariateFunction; @@ -41,8 +41,8 @@ public class TestNeLossParametrisation { System.out.println(norm); - frame.add(PlottableXYFunction.plotFunction("old", x->oldFunction.value(x), 0, 30, 300)); - frame.add(PlottableXYFunction.plotFunction("new", x->newFunction.value(x), 0, 30, 300)); + frame.add(PlotXYFunction.plotFunction("old", x->oldFunction.value(x), 0, 30, 300)); + frame.add(PlotXYFunction.plotFunction("new", x->newFunction.value(x), 0, 30, 300)); } 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 f98458fb..18012085 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.data.PlottableData; -import hep.dataforge.plots.data.PlottableXYFunction; +import hep.dataforge.plots.data.PlotData; +import hep.dataforge.plots.data.PlotXYFunction; import hep.dataforge.plots.jfreechart.JFreeChartFrame; import inr.numass.NumassPlugin; @@ -32,8 +32,8 @@ public class TransmissionInterpolatorTest { //JFreeChartFrame.drawFrame("TransmissionInterpolatorTest", null); TransmissionInterpolator interpolator = TransmissionInterpolator.fromFile(Global.instance(), "d:\\sterile-new\\loss2014-11\\.dataforge\\merge\\empty_sum.onComplete", "Uset", "CR", 15, 0.8, 19002d); - frame.add(PlottableData.plot("data", interpolator.getX(), interpolator.getY())); - frame.add(PlottableXYFunction.plotFunction("interpolated", x->interpolator.value(x), interpolator.getXmin(), interpolator.getXmax(), 2000)); + frame.add(PlotData.plot("data", interpolator.getX(), interpolator.getY())); + frame.add(PlotXYFunction.plotFunction("interpolated", x->interpolator.value(x), interpolator.getXmin(), interpolator.getXmax(), 2000)); // PrintFunction.printFuntionSimple(new PrintWriter(System.onComplete), interpolator, interpolator.getXmin(), interpolator.getXmax(), 500); } diff --git a/numass-viewer/src/main/java/inr/numass/viewer/MspViewController.java b/numass-viewer/src/main/java/inr/numass/viewer/MspViewController.java index 8ffd31ae..449d3664 100644 --- a/numass-viewer/src/main/java/inr/numass/viewer/MspViewController.java +++ b/numass-viewer/src/main/java/inr/numass/viewer/MspViewController.java @@ -27,7 +27,7 @@ import hep.dataforge.names.AlphanumComparator; import hep.dataforge.names.Name; import hep.dataforge.plots.PlotUtils; import hep.dataforge.plots.data.PlotDataUtils; -import hep.dataforge.plots.data.XYPlottable; +import hep.dataforge.plots.data.XYPlot; import hep.dataforge.plots.fx.PlotContainer; import hep.dataforge.plots.jfreechart.JFreeChartFrame; import hep.dataforge.storage.api.PointLoader; @@ -85,7 +85,7 @@ public class MspViewController implements Encapsulated { /** * update detector pane with new data */ - private void updateMspPane(Iterable mspData) { + private void updateMspPane(Iterable mspData) { JFreeChartFrame frame = new JFreeChartFrame(); PlotUtils.setYAxis(frame, "partial pressure", "mbar", "log"); frame.getConfig().setValue("yAxis.range.lower", 1e-10); @@ -93,7 +93,7 @@ public class MspViewController implements Encapsulated { PlotUtils.setXAxis(frame, "time", null, "time"); // StreamSupport.stream(mspData.spliterator(), false) -// .sorted((XYPlottable o1, XYPlottable o2) +// .sorted((XYPlot o1, XYPlot o2) // -> Integer.valueOf(o1.getName()).compareTo(Integer.valueOf(o2.getName()))).forEach((pl) -> frame.add(pl)); frame.addAll(mspData); @@ -123,7 +123,7 @@ public class MspViewController implements Encapsulated { // for (String name : point.names()) { // if (!name.equals("timestamp")) { // if (!getPlottables.has(name)) { -// getPlottables.addPlottable(new TimePlottable(name, name)); +// getPlottables.addPlottable(new TimePlot(name, name)); // } // } // } @@ -222,7 +222,7 @@ public class MspViewController implements Encapsulated { // for (String name : point.names()) { // if (!name.equals("timestamp")) { // if (!getPlottables.has(name)) { -// getPlottables.add(new TimePlottable(name, name)); +// getPlottables.add(new TimePlot(name, name)); // } // } // } diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt index 8276db9f..ebdb5fa8 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt @@ -7,10 +7,10 @@ import hep.dataforge.kodex.buildMeta import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.plots.XYPlotFrame +import hep.dataforge.plots.data.PlotData import hep.dataforge.plots.data.PlotDataUtils -import hep.dataforge.plots.data.PlottableData import hep.dataforge.plots.data.PlottableGroup -import hep.dataforge.plots.data.TimePlottable +import hep.dataforge.plots.data.TimePlot import hep.dataforge.plots.fx.PlotContainer import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.storage.commons.JSONMetaWriter @@ -80,8 +80,8 @@ class NumassLoaderView : View() { private val spectra = HashMap();//spectra cache - val spectrumData = PlottableData("spectrum") - val hvPlotData = PlottableGroup() + val spectrumData = PlotData("spectrum") + val hvPlotData = PlottableGroup() //private var points = FXCollections.observableArrayList() val detectorPlotFrame = JFreeChartFrame( @@ -247,7 +247,7 @@ class NumassLoaderView : View() { for (dp in it) { val block = dp.getString("block", "default") if (!hvPlotData.has(block)) { - hvPlotData.add(TimePlottable(block)) + hvPlotData.add(TimePlot(block)) } hvPlotData.get(block).put(dp.getValue("timestamp").timeValue(), dp.getValue("value")) } @@ -324,7 +324,7 @@ class NumassLoaderView : View() { val index = AtomicInteger(0); data.points.map { point -> val seriesName = String.format("%d: %.2f", index.incrementAndGet(), point.voltage) - PlottableData.plot( + PlotData.plot( seriesName, XYAdapter(NumassAnalyzer.CHANNEL_KEY, valueAxis), NumassDataUtils.spectrumWithBinning(getSpectrum(point), binning) diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt index d9e660b5..d0799d89 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt @@ -3,8 +3,8 @@ package inr.numass.viewer import hep.dataforge.kodex.buildMeta import hep.dataforge.kodex.configure import hep.dataforge.meta.Meta -import hep.dataforge.plots.Plottable -import hep.dataforge.plots.data.PlottableData +import hep.dataforge.plots.Plot +import hep.dataforge.plots.data.PlotData import hep.dataforge.plots.fx.PlotContainer import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.storage.api.PointLoader @@ -33,10 +33,10 @@ class SlowControlView : View("My View") { fun load(loader: PointLoader) { runAsync { val data = getData(loader) - ArrayList().apply { + ArrayList().apply { loader.format.columns.filter { it.name != "timestamp" }.forEach { val adapter = XYAdapter("timestamp", it.name); - this += PlottableData.plot(it.name, adapter, data).configure { + this += PlotData.plot(it.name, adapter, data).configure { "showLine" to true "showSymbol" to false "showErrors" to false diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt index 3dcaa234..84c24965 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt @@ -1,6 +1,6 @@ package inr.numass.viewer.test -import hep.dataforge.plots.data.PlottableData +import hep.dataforge.plots.data.PlotData import hep.dataforge.plots.fx.PlotContainer import hep.dataforge.plots.jfreechart.JFreeChartFrame import hep.dataforge.tables.ValueMap @@ -16,7 +16,7 @@ class JFCTest : View("My View") { val plot = JFreeChartFrame(); val container = PlotContainer(); - val data = PlottableData("data"); + val data = PlotData("data"); val button = button("test") { action {