From a4a3255aeccb5047d085ec3e61b99d50aa7fff00 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 30 Jul 2018 11:55:07 +0300 Subject: [PATCH] Messaging cleanup --- .../main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt | 2 +- .../kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 dfc4c547..0d61d2d9 100644 --- a/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt +++ b/numass-main/src/main/kotlin/inr/numass/actions/TimeAnalyzerAction.kt @@ -90,7 +90,7 @@ object TimeAnalyzerAction : OneToOneAction() { if (inputMeta.getBoolean("plotStat", true)) { - val statPlot = DataPlot(name).configure { + val statPlot = DataPlot(name, adapter = Adapters.DEFAULT_XYERR_ADAPTER).configure { "showLine" to true "thickness" to 4 "title" to "${name}_${input.voltage}" 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 07e17d19..0f558b7a 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 @@ -14,6 +14,8 @@ import inr.numass.data.analyzers.TimeAnalyzer import inr.numass.data.api.SimpleNumassPoint import inr.numass.data.generateBlock import inr.numass.data.withDeadTime +import org.apache.commons.math3.random.JDKRandomGenerator +import org.apache.commons.math3.random.SynchronizedRandomGenerator import java.time.Instant fun main(args: Array) { @@ -28,10 +30,12 @@ fun main(args: Array) { val start = Instant.now() + val generator = SynchronizedRandomGenerator(JDKRandomGenerator(2223)) + val point = (1..num).map { Global.generate { NumassGenerator - .generateEvents(cr * (1.0 - 0.005 * it)) + .generateEvents(cr * (1.0 - 0.005 * it), rnd = generator) .withDeadTime { (dt * 1000).toLong() } .generateBlock(start.plusNanos(it * length), length) }