diff --git a/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt b/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt index b39562eb..5ce0246d 100644 --- a/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt +++ b/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt @@ -5,13 +5,13 @@ import hep.dataforge.context.Global import hep.dataforge.control.DeviceManager import hep.dataforge.control.connections.Roles import hep.dataforge.control.devices.Device -import hep.dataforge.kodex.useMeta -import hep.dataforge.kodex.useMetaList import hep.dataforge.meta.Meta import hep.dataforge.server.ServerManager import hep.dataforge.storage.api.Storage import hep.dataforge.storage.commons.StorageConnection import hep.dataforge.storage.commons.StorageManager +import hep.dataforge.useMeta +import hep.dataforge.useMetaList import inr.numass.client.ClientUtils import javafx.beans.property.SimpleObjectProperty import javafx.collections.FXCollections diff --git a/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteClient.kt b/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteClient.kt index 666454c2..f2a72ea7 100644 --- a/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteClient.kt +++ b/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteClient.kt @@ -16,9 +16,9 @@ package inr.numass.control.dante -import hep.dataforge.kodex.orElse import hep.dataforge.meta.Meta import hep.dataforge.meta.buildMeta +import hep.dataforge.orElse import inr.numass.control.dante.DanteClient.Companion.CommandType.* import inr.numass.control.dante.DanteClient.Companion.Register.* import inr.numass.data.NumassProto diff --git a/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteTest.kt b/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteTest.kt index 17125e7e..25144245 100644 --- a/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteTest.kt +++ b/numass-control/dante/src/main/kotlin/inr/numass/control/dante/DanteTest.kt @@ -16,13 +16,13 @@ package inr.numass.control.dante +import hep.dataforge.configure import hep.dataforge.context.Context import hep.dataforge.context.Global import hep.dataforge.fx.plots.displayPlot -import hep.dataforge.kodex.configure -import hep.dataforge.kodex.nullable import hep.dataforge.meta.KMetaBuilder import hep.dataforge.meta.buildMeta +import hep.dataforge.nullable import hep.dataforge.plots.data.DataPlot import hep.dataforge.plots.jfreechart.chart import hep.dataforge.tables.Adapters diff --git a/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/LambdaHub.kt b/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/LambdaHub.kt index ad05a2ac..eec18653 100644 --- a/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/LambdaHub.kt +++ b/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/LambdaHub.kt @@ -7,10 +7,10 @@ import hep.dataforge.control.devices.DeviceHub import hep.dataforge.control.ports.Port import hep.dataforge.control.ports.PortFactory import hep.dataforge.description.ValueDef -import hep.dataforge.kodex.useEachMeta import hep.dataforge.meta.Meta import hep.dataforge.names.Name import hep.dataforge.states.StateDef +import hep.dataforge.useEachMeta import hep.dataforge.values.ValueType import inr.numass.control.DeviceDisplayFX import inr.numass.control.DeviceView diff --git a/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/VirtualLambdaPort.kt b/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/VirtualLambdaPort.kt index e754f3af..50fe1b44 100644 --- a/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/VirtualLambdaPort.kt +++ b/numass-control/magnet/src/main/kotlin/inr/numass/control/magnet/VirtualLambdaPort.kt @@ -16,8 +16,8 @@ package inr.numass.control.magnet import hep.dataforge.control.ports.VirtualPort -import hep.dataforge.kodex.useEachMeta import hep.dataforge.meta.Meta +import hep.dataforge.useEachMeta import org.slf4j.LoggerFactory import java.time.Duration import java.util.* diff --git a/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspDevice.kt b/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspDevice.kt index 0957a937..7258e6e2 100644 --- a/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspDevice.kt +++ b/numass-control/msp/src/main/kotlin/inr/numass/control/msp/MspDevice.kt @@ -29,7 +29,6 @@ import hep.dataforge.description.ValueDef import hep.dataforge.exceptions.ControlException import hep.dataforge.exceptions.MeasurementException import hep.dataforge.exceptions.PortException -import hep.dataforge.kodex.useMeta import hep.dataforge.meta.Meta import hep.dataforge.states.StateDef import hep.dataforge.states.StateDefs @@ -37,6 +36,7 @@ import hep.dataforge.states.valueState import hep.dataforge.storage.commons.StorageConnection import hep.dataforge.tables.TableFormatBuilder import hep.dataforge.tables.ValuesListener +import hep.dataforge.useMeta import hep.dataforge.values.ValueType import inr.numass.control.DeviceView import inr.numass.control.NumassStorageConnection diff --git a/numass-control/src/main/kotlin/inr/numass/control/NumassControlApplication.kt b/numass-control/src/main/kotlin/inr/numass/control/NumassControlApplication.kt index c01a0a37..054f3e3b 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/NumassControlApplication.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/NumassControlApplication.kt @@ -4,8 +4,8 @@ import ch.qos.logback.classic.Level import hep.dataforge.control.devices.Device import hep.dataforge.control.devices.DeviceFactory import hep.dataforge.exceptions.ControlException -import hep.dataforge.kodex.optional import hep.dataforge.meta.Meta +import hep.dataforge.optional import javafx.scene.Scene import javafx.stage.Stage import org.slf4j.LoggerFactory diff --git a/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt b/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt index 23fcd4e6..7b2d59d6 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt @@ -8,8 +8,8 @@ import hep.dataforge.exceptions.StorageException import hep.dataforge.fx.dfIcon import hep.dataforge.io.MetaFileReader import hep.dataforge.io.XMLMetaReader -import hep.dataforge.kodex.nullable import hep.dataforge.meta.Meta +import hep.dataforge.nullable import hep.dataforge.storage.commons.StorageConnection import hep.dataforge.storage.commons.StorageManager import inr.numass.client.ClientUtils diff --git a/numass-control/src/main/kotlin/inr/numass/control/NumassStorageConnection.kt b/numass-control/src/main/kotlin/inr/numass/control/NumassStorageConnection.kt index d32fe97b..c307c420 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/NumassStorageConnection.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/NumassStorageConnection.kt @@ -3,7 +3,7 @@ package inr.numass.control import hep.dataforge.control.connections.DeviceConnection import hep.dataforge.control.connections.Roles import hep.dataforge.control.devices.Device -import hep.dataforge.kodex.nullable +import hep.dataforge.nullable import hep.dataforge.storage.api.Storage import hep.dataforge.storage.api.TableLoader import hep.dataforge.storage.commons.LoaderFactory diff --git a/numass-control/src/main/kotlin/inr/numass/control/StorageHelper.kt b/numass-control/src/main/kotlin/inr/numass/control/StorageHelper.kt index 24c0be07..ce05fc4e 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/StorageHelper.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/StorageHelper.kt @@ -1,7 +1,7 @@ package inr.numass.control import hep.dataforge.control.devices.AbstractDevice -import hep.dataforge.kodex.nullable +import hep.dataforge.nullable import hep.dataforge.storage.api.TableLoader import hep.dataforge.storage.commons.StorageConnection import hep.dataforge.values.Values diff --git a/numass-core/src/main/kotlin/inr/numass/data/api/NumassSet.kt b/numass-core/src/main/kotlin/inr/numass/data/api/NumassSet.kt index e2596bc4..741a6c3b 100644 --- a/numass-core/src/main/kotlin/inr/numass/data/api/NumassSet.kt +++ b/numass-core/src/main/kotlin/inr/numass/data/api/NumassSet.kt @@ -6,8 +6,8 @@ package inr.numass.data.api import hep.dataforge.Named -import hep.dataforge.kodex.optional import hep.dataforge.meta.Metoid +import hep.dataforge.optional import hep.dataforge.providers.Provider import hep.dataforge.providers.Provides import hep.dataforge.providers.ProvidesNames diff --git a/numass-core/src/main/kotlin/inr/numass/data/storage/NumassDataLoader.kt b/numass-core/src/main/kotlin/inr/numass/data/storage/NumassDataLoader.kt index c997e850..3aa3a468 100644 --- a/numass-core/src/main/kotlin/inr/numass/data/storage/NumassDataLoader.kt +++ b/numass-core/src/main/kotlin/inr/numass/data/storage/NumassDataLoader.kt @@ -19,7 +19,6 @@ import hep.dataforge.context.Context import hep.dataforge.exceptions.StorageException import hep.dataforge.io.ColumnedDataReader import hep.dataforge.io.envelopes.Envelope -import hep.dataforge.kodex.toList import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.providers.Provider @@ -29,6 +28,7 @@ import hep.dataforge.storage.commons.DummyStorage import hep.dataforge.storage.filestorage.FileStorage import hep.dataforge.storage.loaders.AbstractLoader import hep.dataforge.tables.Table +import hep.dataforge.toList import inr.numass.data.api.NumassPoint import inr.numass.data.api.NumassSet import inr.numass.data.legacy.NumassFileEnvelope diff --git a/numass-core/src/main/kotlin/inr/numass/data/storage/ProtoNumassPoint.kt b/numass-core/src/main/kotlin/inr/numass/data/storage/ProtoNumassPoint.kt index ba1e01df..a4576274 100644 --- a/numass-core/src/main/kotlin/inr/numass/data/storage/ProtoNumassPoint.kt +++ b/numass-core/src/main/kotlin/inr/numass/data/storage/ProtoNumassPoint.kt @@ -3,8 +3,8 @@ package inr.numass.data.storage import hep.dataforge.context.Context import hep.dataforge.context.Global import hep.dataforge.io.envelopes.Envelope -import hep.dataforge.kodex.toList import hep.dataforge.meta.Meta +import hep.dataforge.toList import inr.numass.data.NumassProto import inr.numass.data.api.* import inr.numass.data.dataStream 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 2c76b02a..2a7346ba 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 @@ -18,7 +18,6 @@ import hep.dataforge.plots.PlotGroup import hep.dataforge.plots.data.DataPlot import hep.dataforge.tables.Adapters import hep.dataforge.tables.Table -import hep.dataforge.tables.TableTransform import inr.numass.NumassPlugin import inr.numass.data.analyzers.NumassAnalyzerKt import inr.numass.subthreshold.Threshold 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 712ba8d2..7f5a6b75 100644 --- a/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java +++ b/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java @@ -40,7 +40,7 @@ import java.util.Map.Entry; import java.util.TreeMap; import java.util.concurrent.CopyOnWriteArrayList; -import static hep.dataforge.io.output.Output.TEXT_MODE; +import static hep.dataforge.io.output.Output.TEXT_TYPE; /** * @author Darksnake @@ -131,7 +131,7 @@ public class MonitorCorrectAction extends OneToOneAction { // } Table res = ListTable.infer(dataList); - context.getOutput().get(getName(), name, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(res, meta), Meta.empty()); + context.getOutput().get(getName(), name, TEXT_TYPE).render(NumassUtils.INSTANCE.wrap(res, meta), Meta.empty()); return res; } @@ -196,7 +196,7 @@ public class MonitorCorrectAction extends OneToOneAction { String monitorFileName = meta.getString("monitorFile", "monitor"); ListTable data = ListTable.infer(monitorPoints); - context.getOutput().get(getName(), monitorFileName, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(data, meta), Meta.empty()); + context.getOutput().get(getName(), monitorFileName, TEXT_TYPE).render(NumassUtils.INSTANCE.wrap(data, meta), Meta.empty()); // ColumnedDataWriter.writeTable(stream, TableTransform.sort(data, "Timestamp", true), "Monitor points", monitorNames); } } diff --git a/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java b/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java index 3b7ce6f8..6424b02f 100644 --- a/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java +++ b/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import static hep.dataforge.io.output.Output.TEXT_MODE; +import static hep.dataforge.io.output.Output.TEXT_TYPE; /** * @author Alexander Nozik @@ -51,7 +51,7 @@ public class SubstractSpectrumAction extends OneToOneAction { Table res = builder.build(); - context.getOutput().get(getName(), name, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(res, inputMeta), Meta.empty()); + context.getOutput().get(getName(), name, TEXT_TYPE).render(NumassUtils.INSTANCE.wrap(res, inputMeta), Meta.empty()); return res; } catch (IOException ex) { throw new RuntimeException("Could not read reference file", ex); diff --git a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java index 95ac5a08..3b663eb9 100644 --- a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java +++ b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java @@ -8,7 +8,7 @@ package inr.numass.utils; import hep.dataforge.meta.Meta; import hep.dataforge.tables.ListTable; import hep.dataforge.tables.Table; -import hep.dataforge.tables.TableTransform; +import hep.dataforge.tables.Tables; import hep.dataforge.values.ValueMap; import hep.dataforge.values.Values; import inr.numass.data.analyzers.NumassAnalyzer; @@ -109,7 +109,7 @@ public class UnderflowCorrection { if (xHigh <= xLow) { throw new IllegalArgumentException("Wrong borders for underflow calculation"); } - Table binned = TableTransform.filter( + Table binned = Tables.filter( NumassAnalyzerKt.withBinning(spectrum, binning), CHANNEL_KEY, xLow, diff --git a/numass-main/src/main/kotlin/inr/numass/actions/MergeDataAction.kt b/numass-main/src/main/kotlin/inr/numass/actions/MergeDataAction.kt index b943c2b2..79ee61c6 100644 --- a/numass-main/src/main/kotlin/inr/numass/actions/MergeDataAction.kt +++ b/numass-main/src/main/kotlin/inr/numass/actions/MergeDataAction.kt @@ -26,7 +26,7 @@ import hep.dataforge.meta.Meta import hep.dataforge.tables.ListTable import hep.dataforge.tables.MetaTableFormat import hep.dataforge.tables.Table -import hep.dataforge.tables.TableTransform +import hep.dataforge.tables.Tables import hep.dataforge.values.ValueMap import hep.dataforge.values.Values import inr.numass.NumassUtils @@ -56,7 +56,7 @@ object MergeDataAction : ManyToOneAction() { override fun execute(context: Context, nodeName: String, data: Map, meta: Laminate): Table { val res = mergeDataSets(data.values) - return ListTable(res.format, TableTransform.sort(res, NumassPoint.HV_KEY, true)) + return ListTable(res.format, Tables.sort(res, NumassPoint.HV_KEY, true).toList()) } override fun afterGroup(context: Context, groupName: String, outputMeta: Meta, output: Table) { diff --git a/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt b/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt index d73647fa..8be2059e 100644 --- a/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt +++ b/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt @@ -1,9 +1,9 @@ package inr.numass.actions import hep.dataforge.actions.OneToOneAction +import hep.dataforge.configure import hep.dataforge.context.Context import hep.dataforge.description.* -import hep.dataforge.kodex.configure import hep.dataforge.maths.histogram.UnivariateHistogram import hep.dataforge.meta.Laminate import hep.dataforge.plots.XYFunctionPlot diff --git a/numass-main/src/main/kotlin/inr/numass/actions/TimeSpectrumAction.kt b/numass-main/src/main/kotlin/inr/numass/actions/TimeSpectrumAction.kt index f12a6f55..98c0069e 100644 --- a/numass-main/src/main/kotlin/inr/numass/actions/TimeSpectrumAction.kt +++ b/numass-main/src/main/kotlin/inr/numass/actions/TimeSpectrumAction.kt @@ -1,9 +1,9 @@ package inr.numass.actions import hep.dataforge.actions.OneToOneAction +import hep.dataforge.configure import hep.dataforge.context.Context import hep.dataforge.description.* -import hep.dataforge.kodex.configure import hep.dataforge.maths.histogram.UnivariateHistogram import hep.dataforge.meta.Laminate import hep.dataforge.meta.buildMeta diff --git a/numass-main/src/main/kotlin/inr/numass/data/Visualization.kt b/numass-main/src/main/kotlin/inr/numass/data/Visualization.kt index 0202b097..841751db 100644 --- a/numass-main/src/main/kotlin/inr/numass/data/Visualization.kt +++ b/numass-main/src/main/kotlin/inr/numass/data/Visualization.kt @@ -16,13 +16,13 @@ package inr.numass.data +import hep.dataforge.configure import hep.dataforge.context.Context import hep.dataforge.context.Global import hep.dataforge.fx.plots.displayPlot -import hep.dataforge.kodex.configure -import hep.dataforge.kodex.nullable import hep.dataforge.meta.KMetaBuilder import hep.dataforge.meta.buildMeta +import hep.dataforge.nullable import hep.dataforge.plots.data.DataPlot import hep.dataforge.plots.jfreechart.chart import hep.dataforge.tables.Adapters diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/Correlation.kt b/numass-main/src/main/kotlin/inr/numass/scripts/Correlation.kt index 5f0b0253..f53784fd 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/Correlation.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/Correlation.kt @@ -16,7 +16,7 @@ package inr.numass.scripts -import hep.dataforge.kodex.buildContext +import hep.dataforge.buildContext import hep.dataforge.meta.buildMeta import inr.numass.NumassPlugin import inr.numass.data.NumassDataUtils 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 d2aefb8a..ce0fb1dd 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChain.kt @@ -16,8 +16,8 @@ package inr.numass.scripts +import hep.dataforge.buildContext import hep.dataforge.description.Descriptors -import hep.dataforge.kodex.buildContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.data.DataPlot import inr.numass.NumassPlugin 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 ea324a49..49ddcdae 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/InversedChainProto.kt @@ -16,8 +16,8 @@ package inr.numass.scripts +import hep.dataforge.buildContext import hep.dataforge.description.Descriptors -import hep.dataforge.kodex.buildContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.data.DataPlot import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/models/DifferentialSpectrum.kt b/numass-main/src/main/kotlin/inr/numass/scripts/models/DifferentialSpectrum.kt index 59327499..f03f5b84 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/models/DifferentialSpectrum.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/models/DifferentialSpectrum.kt @@ -16,8 +16,8 @@ package inr.numass.scripts.models +import hep.dataforge.buildContext import hep.dataforge.description.Descriptors -import hep.dataforge.kodex.buildContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.data.DataPlot import hep.dataforge.tables.replaceColumn diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/models/IntegralSpectrum.kt b/numass-main/src/main/kotlin/inr/numass/scripts/models/IntegralSpectrum.kt index 5be1bac5..a8d9c477 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/models/IntegralSpectrum.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/models/IntegralSpectrum.kt @@ -16,11 +16,10 @@ package inr.numass.scripts.models +import hep.dataforge.buildContext +import hep.dataforge.configure import hep.dataforge.fx.output.FXOutputManager import hep.dataforge.io.output.stream -import hep.dataforge.kodex.buildContext -import hep.dataforge.kodex.configure -import hep.dataforge.kodex.step import hep.dataforge.meta.Meta import hep.dataforge.plots.Plot import hep.dataforge.plots.data.DataPlot @@ -31,6 +30,7 @@ import hep.dataforge.stat.fit.FitStage import hep.dataforge.stat.fit.FitState import hep.dataforge.stat.fit.ParamSet import hep.dataforge.stat.models.XYModel +import hep.dataforge.step import hep.dataforge.tables.Adapters.X_AXIS import hep.dataforge.values.ValueMap import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/AnalyzePoint.kt b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/AnalyzePoint.kt index 3bbf7402..b93684dd 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/AnalyzePoint.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/AnalyzePoint.kt @@ -1,8 +1,8 @@ package inr.numass.scripts.timeanalysis +import hep.dataforge.buildContext import hep.dataforge.data.DataSet import hep.dataforge.fx.output.FXOutputManager -import hep.dataforge.kodex.buildContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.jfreechart.JFreeChartPlugin import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/Histogram.kt b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/Histogram.kt index 7939884f..df670f8b 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/Histogram.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/Histogram.kt @@ -16,7 +16,7 @@ package inr.numass.scripts.timeanalysis -import hep.dataforge.kodex.buildContext +import hep.dataforge.buildContext import hep.dataforge.maths.histogram.SimpleHistogram import hep.dataforge.meta.buildMeta import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt index 739bb026..1d8bd70b 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt @@ -1,10 +1,10 @@ package inr.numass.scripts.timeanalysis import hep.dataforge.context.Global +import hep.dataforge.coroutineContext import hep.dataforge.fx.output.FXOutputManager import hep.dataforge.goals.generate import hep.dataforge.goals.join -import hep.dataforge.kodex.coroutineContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.jfreechart.JFreeChartPlugin import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestBunch.kt b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestBunch.kt index 4ac25c8d..5c7fceb8 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestBunch.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestBunch.kt @@ -17,10 +17,10 @@ package inr.numass.scripts.timeanalysis import hep.dataforge.context.Global +import hep.dataforge.coroutineContext import hep.dataforge.fx.output.FXOutputManager import hep.dataforge.goals.generate import hep.dataforge.goals.join -import hep.dataforge.kodex.coroutineContext import hep.dataforge.meta.buildMeta import hep.dataforge.plots.jfreechart.JFreeChartPlugin import inr.numass.NumassPlugin diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/tristan/ProtoPoint.kt b/numass-main/src/main/kotlin/inr/numass/scripts/tristan/ProtoPoint.kt index c9e421b3..f34e8c03 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/tristan/ProtoPoint.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/tristan/ProtoPoint.kt @@ -17,7 +17,7 @@ package inr.numass.scripts.tristan import hep.dataforge.context.Global -import hep.dataforge.kodex.toList +import hep.dataforge.toList import inr.numass.data.api.NumassPoint import inr.numass.data.channel import inr.numass.data.storage.NumassDataLoader diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/utils/ScanTree.kt b/numass-main/src/main/kotlin/inr/numass/scripts/utils/ScanTree.kt index 1c626dee..4f6d29d7 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/utils/ScanTree.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/utils/ScanTree.kt @@ -2,12 +2,12 @@ package inr.numass.scripts.utils import hep.dataforge.context.Global import hep.dataforge.io.XMLMetaWriter -import hep.dataforge.kodex.useValue import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.meta.MetaUtils import hep.dataforge.meta.buildMeta import hep.dataforge.storage.api.Storage +import hep.dataforge.useValue import inr.numass.data.storage.NumassDataLoader import inr.numass.data.storage.NumassStorageFactory import java.io.File diff --git a/numass-main/src/main/kotlin/inr/numass/subthreshold/Threshold.kt b/numass-main/src/main/kotlin/inr/numass/subthreshold/Threshold.kt index 34f40e09..d8c281af 100644 --- a/numass-main/src/main/kotlin/inr/numass/subthreshold/Threshold.kt +++ b/numass-main/src/main/kotlin/inr/numass/subthreshold/Threshold.kt @@ -1,9 +1,9 @@ package inr.numass.subthreshold +import hep.dataforge.actions.pipe import hep.dataforge.context.Context import hep.dataforge.data.DataNode import hep.dataforge.data.DataSet -import hep.dataforge.kodex.pipe import hep.dataforge.meta.Meta import hep.dataforge.meta.buildMeta import hep.dataforge.storage.commons.StorageUtils diff --git a/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanSummaryTask.kt b/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanSummaryTask.kt index ab69ecd6..580c844b 100644 --- a/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanSummaryTask.kt +++ b/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanSummaryTask.kt @@ -16,7 +16,7 @@ import hep.dataforge.stat.fit.FitResult import hep.dataforge.stat.fit.UpperLimitGenerator import hep.dataforge.tables.ListTable import hep.dataforge.tables.Table -import hep.dataforge.tables.TableTransform +import hep.dataforge.tables.Tables import hep.dataforge.workspace.tasks.AbstractTask import hep.dataforge.workspace.tasks.TaskModel import inr.numass.NumassUtils @@ -66,7 +66,7 @@ object NumassFitScanSummaryTask : AbstractTask(Table::class.java) { pars.getValue("E0"), pars.getValue("trap")) } - val res = TableTransform.sort(builder.build(), "m", true) + val res = Tables.sort(builder.build(), "m", true) context.output[name, nodeName].render(NumassUtils.wrap(res, meta)) return res } diff --git a/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanTask.kt b/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanTask.kt index 945289a7..1dc5b9b7 100644 --- a/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanTask.kt +++ b/numass-main/src/main/kotlin/inr/numass/tasks/NumassFitScanTask.kt @@ -7,12 +7,12 @@ package inr.numass.tasks import hep.dataforge.data.DataNode import hep.dataforge.data.DataTree -import hep.dataforge.kodex.useMeta import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.stat.fit.FitAction import hep.dataforge.stat.fit.FitResult import hep.dataforge.tables.Table +import hep.dataforge.useMeta import hep.dataforge.values.ListValue import hep.dataforge.values.Value import hep.dataforge.values.asValue 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 cdace6dd..40810147 100644 --- a/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt +++ b/numass-main/src/main/kotlin/inr/numass/tasks/NumassTasks.kt @@ -1,16 +1,16 @@ package inr.numass.tasks +import hep.dataforge.configure import hep.dataforge.data.CustomDataFilter import hep.dataforge.data.DataSet import hep.dataforge.data.DataTree import hep.dataforge.data.DataUtils import hep.dataforge.io.output.stream import hep.dataforge.io.render -import hep.dataforge.kodex.nullable -import hep.dataforge.kodex.useMeta import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaUtils import hep.dataforge.meta.buildMeta +import hep.dataforge.nullable import hep.dataforge.plots.XYFunctionPlot import hep.dataforge.plots.data.DataPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame @@ -20,6 +20,7 @@ import hep.dataforge.stat.fit.FitHelper import hep.dataforge.stat.fit.FitResult import hep.dataforge.stat.models.XYModel import hep.dataforge.tables.* +import hep.dataforge.useMeta import hep.dataforge.values.ValueType import hep.dataforge.values.Values import hep.dataforge.workspace.tasks.task @@ -40,6 +41,7 @@ import inr.numass.utils.ExpressionUtils import java.io.PrintWriter import java.util.* import java.util.concurrent.atomic.AtomicLong +import java.util.function.Predicate import java.util.stream.StreamSupport import kotlin.collections.set @@ -205,9 +207,9 @@ val filterTask = task("filter") { val uLo = meta.getDouble("from", 0.0) val uHi = meta.getDouble("to", java.lang.Double.POSITIVE_INFINITY) this.log.report("Filtering finished") - TableTransform.filter(data, NumassPoint.HV_KEY, uLo, uHi) + Tables.filter(data, NumassPoint.HV_KEY, uLo, uHi) } else if (meta.hasValue("condition")) { - TableTransform.filter(data) { ExpressionUtils.condition(meta.getString("condition"), it.unbox()) } + Tables.filter(data, Predicate{ ExpressionUtils.condition(meta.getString("condition"), it.unbox()) }) } else { throw RuntimeException("No filtering condition specified") } @@ -273,6 +275,7 @@ val plotFitTask = task("plotFit") { val histogramTask = task("histogram") { descriptor { value("plot", types = listOf(ValueType.BOOLEAN), defaultValue = false, info = "Show plot of the spectra") + value("points", multiple = true, types = listOf(ValueType.NUMBER), info = " The list of point voltages to build histogram") info = "Combine amplitude spectra from multiple sets, but with the same U" } model { meta -> @@ -331,6 +334,12 @@ val histogramTask = task("histogram") { if (meta.getBoolean("plot", false)) { context.plot("$name.plot", stage = "numass.histogram") { plots.setType() + plots.configure { + "showSymbol" to false + "showErrors" to false + "showLine" to true + "connectionType" to "step" + } table.format.names.filter { it != "channel" }.forEach { +DataPlot.plot(it, table, adapter = Adapters.buildXYAdapter("channel", it)) } diff --git a/numass-main/src/test/java/inr/numass/models/TestModels.kt b/numass-main/src/test/java/inr/numass/models/TestModels.kt index 3b395b7d..6ccd3b07 100644 --- a/numass-main/src/test/java/inr/numass/models/TestModels.kt +++ b/numass-main/src/test/java/inr/numass/models/TestModels.kt @@ -6,12 +6,12 @@ package inr.numass.models import hep.dataforge.context.Context -import hep.dataforge.kodex.step import hep.dataforge.maths.functions.FunctionLibrary import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.stat.fit.ParamSet import hep.dataforge.stat.parametric.ParametricFunction +import hep.dataforge.step import inr.numass.Numass import inr.numass.models.sterile.SterileNeutrinoSpectrum import org.apache.commons.math3.analysis.BivariateFunction diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt index 67df6269..5d8f873e 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt @@ -1,12 +1,12 @@ package inr.numass.viewer +import hep.dataforge.configure import hep.dataforge.fx.dfIcon import hep.dataforge.fx.except import hep.dataforge.fx.plots.PlotContainer import hep.dataforge.fx.runGoal import hep.dataforge.fx.ui import hep.dataforge.goals.Goal -import hep.dataforge.kodex.configure import hep.dataforge.plots.PlotFrame import hep.dataforge.plots.PlotGroup import hep.dataforge.plots.Plottable diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/HVView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/HVView.kt index 0735e2ac..bb67ef7e 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/HVView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/HVView.kt @@ -1,10 +1,10 @@ package inr.numass.viewer +import hep.dataforge.configure import hep.dataforge.fx.dfIcon import hep.dataforge.fx.plots.PlotContainer import hep.dataforge.fx.runGoal import hep.dataforge.fx.ui -import hep.dataforge.kodex.configure import hep.dataforge.plots.PlotFrame import hep.dataforge.plots.data.DataPlot import hep.dataforge.plots.data.TimePlot 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 4eb72392..b2a93ab5 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt @@ -1,10 +1,10 @@ package inr.numass.viewer +import hep.dataforge.configure import hep.dataforge.fx.dfIcon import hep.dataforge.fx.plots.PlotContainer import hep.dataforge.fx.runGoal import hep.dataforge.fx.ui -import hep.dataforge.kodex.configure import hep.dataforge.meta.Meta import hep.dataforge.plots.PlotGroup import hep.dataforge.plots.data.DataPlot diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/SpectrumView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/SpectrumView.kt index a547b6cf..a9f34e0e 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/SpectrumView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/SpectrumView.kt @@ -1,10 +1,10 @@ package inr.numass.viewer +import hep.dataforge.configure import hep.dataforge.fx.dfIcon import hep.dataforge.fx.plots.PlotContainer import hep.dataforge.fx.runGoal import hep.dataforge.fx.ui -import hep.dataforge.kodex.configure import hep.dataforge.plots.PlotFrame import hep.dataforge.plots.data.DataPlot import hep.dataforge.plots.jfreechart.JFreeChartFrame