Fix automatic dependency loading for output manager
This commit is contained in:
parent
8be357b4ab
commit
2a6c7b75a5
@ -36,7 +36,6 @@ import java.util.stream.Stream
|
||||
import kotlin.math.sqrt
|
||||
import kotlin.streams.asSequence
|
||||
import kotlin.streams.asStream
|
||||
import kotlin.streams.toList
|
||||
|
||||
|
||||
/**
|
||||
@ -99,9 +98,8 @@ class TimeAnalyzer(processor: SignalProcessor? = null) : AbstractAnalyzer(proces
|
||||
|
||||
override fun analyzeParent(point: ParentBlock, config: Meta): Values {
|
||||
//Average count rates, do not sum events
|
||||
val res = point.blocks.stream()
|
||||
val res = point.blocks
|
||||
.map { it -> analyze(it, config) }
|
||||
.toList()
|
||||
.mean(config.getEnum("mean", WEIGHTED))
|
||||
|
||||
val map = HashMap(res.asMap())
|
||||
|
@ -1,8 +1,10 @@
|
||||
package inr.numass.scripts.timeanalysis
|
||||
|
||||
import hep.dataforge.data.DataSet
|
||||
import hep.dataforge.fx.output.FXOutputManager
|
||||
import hep.dataforge.kodex.buildContext
|
||||
import hep.dataforge.kodex.buildMeta
|
||||
import hep.dataforge.plots.jfreechart.JFreeChartPlugin
|
||||
import inr.numass.NumassPlugin
|
||||
import inr.numass.actions.TimeAnalyzerAction
|
||||
import inr.numass.data.NumassDataUtils
|
||||
@ -14,20 +16,21 @@ import inr.numass.data.storage.NumassStorageFactory
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
val context = buildContext("NUMASS", NumassPlugin::class.java) {
|
||||
val context = buildContext("NUMASS", NumassPlugin::class.java, JFreeChartPlugin::class.java) {
|
||||
output = FXOutputManager()
|
||||
rootDir = "D:\\Work\\Numass\\sterile2018_04"
|
||||
dataDir = "D:\\Work\\Numass\\data\\2018_04"
|
||||
}
|
||||
|
||||
val storage = NumassStorageFactory.buildLocal(context, "Fill_4", true, false);
|
||||
val storage = NumassStorageFactory.buildLocal(context, "Fill_4/Scattering_1", true, false);
|
||||
|
||||
val meta = buildMeta {
|
||||
"t0" to 3000
|
||||
"binNum" to 200
|
||||
"t0Step" to 100
|
||||
"chunkSize" to 3000
|
||||
"mean" to TimeAnalyzer.AveragingMethod.GEOMETRIC
|
||||
// "separateParallelBlocks" to true
|
||||
"mean" to TimeAnalyzer.AveragingMethod.ARITHMETIC
|
||||
"separateParallelBlocks" to true
|
||||
"window" to {
|
||||
"lo" to 0
|
||||
"up" to 4000
|
||||
@ -44,10 +47,10 @@ fun main(args: Array<String>) {
|
||||
storage.provide("loader::$set", NumassSet::class.java).orElse(null)
|
||||
}.filter { it != null }
|
||||
|
||||
val hvs = listOf(12000.0, 14000.0, 16000.0)//, 15000d, 15200d, 15400d, 15600d, 15800d]
|
||||
|
||||
val all = NumassDataUtils.join("sum", loaders)
|
||||
|
||||
val hvs = listOf(18500.0, 18600.0, 18995.0, 19000.0)//listOf(12000.0, 14000.0, 16000.0)//, 15000d, 15200d, 15400d, 15600d, 15800d]
|
||||
|
||||
val data = DataSet.edit(NumassPoint::class).apply {
|
||||
hvs.forEach { hv ->
|
||||
val points = all.points.filter {
|
||||
|
Loading…
Reference in New Issue
Block a user