Minor fixes to visualization.
This commit is contained in:
parent
01d1fe5528
commit
4a1752ca07
@ -84,8 +84,8 @@ class TimeSpectrumAction : OneToOneAction<NumassPoint, Table>() {
|
||||
|
||||
context.plot("histogram", name, histogramPlot) {
|
||||
"xAxis" to {
|
||||
"axisTitle" to "delay"
|
||||
"axisUnits" to "us"
|
||||
"title" to "delay"
|
||||
"units" to "us"
|
||||
}
|
||||
"yAxis" to {
|
||||
"type" to "log"
|
||||
|
@ -6,6 +6,7 @@ import hep.dataforge.kodex.buildMeta
|
||||
import inr.numass.NumassPlugin
|
||||
import inr.numass.actions.TimeAnalyzerAction
|
||||
import inr.numass.data.NumassDataUtils
|
||||
import inr.numass.data.analyzers.TimeAnalyzer
|
||||
import inr.numass.data.api.NumassPoint
|
||||
import inr.numass.data.api.NumassSet
|
||||
import inr.numass.data.api.SimpleNumassPoint
|
||||
@ -25,8 +26,9 @@ fun main(args: Array<String>) {
|
||||
"binNum" to 200
|
||||
"t0Step" to 100
|
||||
"chunkSize" to 3000
|
||||
"mean" to TimeAnalyzer.AveragingMethod.GEOMETRIC
|
||||
// "separateParallelBlocks" to true
|
||||
node("window") {
|
||||
"window" to {
|
||||
"lo" to 0
|
||||
"up" to 4000
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ if (!hasProperty('mainClass')) {
|
||||
|
||||
mainClassName = mainClass
|
||||
|
||||
version = "0.5.1 - SNAPSHOT"
|
||||
version = "0.5.2 - SNAPSHOT"
|
||||
|
||||
description = "The viewer for numass data"
|
||||
|
||||
|
@ -92,10 +92,15 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag
|
||||
}
|
||||
|
||||
binningProperty.onChange {
|
||||
clear()
|
||||
frame.plots.clear()
|
||||
plots.clear()
|
||||
invalidate()
|
||||
}
|
||||
|
||||
normalizeProperty.onChange {
|
||||
clear()
|
||||
frame.plots.clear()
|
||||
plots.clear()
|
||||
invalidate()
|
||||
}
|
||||
|
||||
container.progressProperty.bind(progress)
|
||||
@ -161,8 +166,10 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag
|
||||
|
||||
fun clear() {
|
||||
data.clear()
|
||||
// frame.plots.clear()
|
||||
// plots.clear()
|
||||
plots.values.forEach{
|
||||
it.cancel()
|
||||
}
|
||||
plots.clear()
|
||||
invalidate()
|
||||
}
|
||||
|
||||
|
@ -35,15 +35,11 @@ class CachedPoint(val point: NumassPoint) : NumassPoint by point {
|
||||
|
||||
override val meta: Meta = point.meta
|
||||
|
||||
val channelSpectra: Deferred<Map<Int, Table>>
|
||||
get() = async(start = CoroutineStart.LAZY) {
|
||||
return@async point.channels.mapValues { (_, value) -> analyzer.getAmplitudeSpectrum(value) }
|
||||
}
|
||||
val channelSpectra: Deferred<Map<Int, Table>> = async(start = CoroutineStart.LAZY) {
|
||||
point.channels.mapValues { (_, value) -> analyzer.getAmplitudeSpectrum(value) }
|
||||
}
|
||||
|
||||
val spectrum: Deferred<Table>
|
||||
get() = async(start = CoroutineStart.LAZY) {
|
||||
analyzer.getAmplitudeSpectrum(point)
|
||||
}
|
||||
val spectrum: Deferred<Table> = async(start = CoroutineStart.LAZY) { analyzer.getAmplitudeSpectrum(point) }
|
||||
}
|
||||
|
||||
class CachedSet(set: NumassSet) : NumassSet by set {
|
||||
|
Loading…
Reference in New Issue
Block a user