Fix in JFreeChart and general plotting
This commit is contained in:
parent
500037fd42
commit
b02c14eb34
@ -94,17 +94,34 @@ object TimeAnalyzerAction : OneToOneAction<NumassPoint, Table>() {
|
|||||||
"showLine" to true
|
"showLine" to true
|
||||||
"thickness" to 4
|
"thickness" to 4
|
||||||
"title" to "${name}_${input.voltage}"
|
"title" to "${name}_${input.voltage}"
|
||||||
}.apply {
|
update(inputMeta.getMetaOrEmpty("plot"))
|
||||||
configure(inputMeta.getMetaOrEmpty("plot"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context.plot(statPlot, stage = this.name, name = "stat-method") {
|
val errorPlot = DataPlot(name).configure{
|
||||||
|
"showLine" to true
|
||||||
|
"showErrors" to false
|
||||||
|
"showSymbol" to false
|
||||||
|
"thickness" to 4
|
||||||
|
"title" to "${name}_${input.voltage}"
|
||||||
|
}
|
||||||
|
|
||||||
|
context.plot(statPlot, stage = this.name, name = "count rate") {
|
||||||
"xAxis" to {
|
"xAxis" to {
|
||||||
"title" to "delay"
|
"title" to "delay"
|
||||||
"units" to "us"
|
"units" to "us"
|
||||||
}
|
}
|
||||||
"yAxis" to {
|
"yAxis" to {
|
||||||
"title" to "Relative count rate"
|
"title" to "Reconstructed count rate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.plot(errorPlot, stage = this.name, name = "error"){
|
||||||
|
"xAxis" to {
|
||||||
|
"title" to "delay"
|
||||||
|
"units" to "us"
|
||||||
|
}
|
||||||
|
"yAxis" to {
|
||||||
|
"title" to "Statistical error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,6 +148,10 @@ object TimeAnalyzerAction : OneToOneAction<NumassPoint, Table>() {
|
|||||||
result.getDouble(NumassAnalyzer.COUNT_RATE_ERROR_KEY) / norm
|
result.getDouble(NumassAnalyzer.COUNT_RATE_ERROR_KEY) / norm
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
errorPlot.append(
|
||||||
|
Adapters.buildXYDataPoint(t/1000.0, result.getDouble(NumassAnalyzer.COUNT_RATE_ERROR_KEY) / norm)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ fun main(args: Array<String>) {
|
|||||||
.generateEvents(cr)
|
.generateEvents(cr)
|
||||||
|
|
||||||
val bunches = NumassGenerator
|
val bunches = NumassGenerator
|
||||||
.generateBunches(6.0, 0.001, 5.0)
|
.generateBunches(10.0, 0.001, 5.0)
|
||||||
|
|
||||||
val discharges = NumassGenerator
|
val discharges = NumassGenerator
|
||||||
.generateBunches(50.0,0.001,0.1)
|
.generateBunches(50.0,0.001,0.1)
|
||||||
|
Loading…
Reference in New Issue
Block a user