Minor fixes
This commit is contained in:
parent
2b896ea6d2
commit
a11f8d99d0
@ -42,7 +42,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
println("actual count rate: ${point.events.count().toDouble() / point.length.seconds}")
|
||||
|
||||
TimeAnalyzerAction().simpleRun(point, meta)
|
||||
TimeAnalyzerAction.simpleRun(point, meta)
|
||||
|
||||
// val res = SmartAnalyzer().analyze(point, meta)
|
||||
// .getDouble(NumassAnalyzer.COUNT_RATE_KEY)
|
||||
|
@ -68,7 +68,7 @@ fun main(args: Array<String>) {
|
||||
}.build()
|
||||
|
||||
|
||||
val result = TimeAnalyzerAction().run(context, data, meta);
|
||||
val result = TimeAnalyzerAction.run(context, data, meta);
|
||||
|
||||
result.nodeGoal().run()
|
||||
|
||||
|
@ -2,6 +2,8 @@ package inr.numass.scripts.timeanalysis
|
||||
|
||||
import hep.dataforge.context.Global
|
||||
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
|
||||
@ -28,7 +30,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
val point = (1..num).map {
|
||||
Global.generate {
|
||||
NumassGenerator.generateEvents(cr).withDeadTime { (dt*1000).toLong() }.generateBlock(start.plusNanos(it * length), length)
|
||||
NumassGenerator.generateEvents(cr).withDeadTime { (dt * 1000).toLong() }.generateBlock(start.plusNanos(it * length), length)
|
||||
}
|
||||
}.join(Global.coroutineContext) { blocks ->
|
||||
SimpleNumassPoint(blocks, 12000.0)
|
||||
@ -45,5 +47,5 @@ fun main(args: Array<String>) {
|
||||
"t0.max" to 1e4
|
||||
}
|
||||
|
||||
TimeAnalyzerAction().simpleRun(point, meta);
|
||||
TimeAnalyzerAction.simpleRun(point, meta);
|
||||
}
|
@ -68,5 +68,5 @@ fun main(args: Array<String>) {
|
||||
"binNum" to 200
|
||||
}
|
||||
|
||||
TimeAnalyzerAction().simpleRun(point, meta);
|
||||
TimeAnalyzerAction.simpleRun(point, meta);
|
||||
}
|
@ -24,14 +24,13 @@ import inr.numass.NumassUtils
|
||||
/**
|
||||
* @author Alexander Nozik
|
||||
*/
|
||||
object NumassFitScanSummaryTask : AbstractTask<Table>() {
|
||||
|
||||
object NumassFitScanSummaryTask : AbstractTask<Table>(Table::class.java) {
|
||||
override fun run(model: TaskModel, data: DataNode<*>): DataNode<Table> {
|
||||
val builder = DataSet.edit(Table::class)
|
||||
val action = FitSummaryAction()
|
||||
val input = data.checked(FitResult::class.java)
|
||||
input.nodeStream()
|
||||
.filter { it -> it.getSize(false) > 0 }
|
||||
.filter { it -> it.count(false) > 0 }
|
||||
.forEach { node -> builder.putData(node.name, action.run(model.context, node, model.meta).data!!) }
|
||||
return builder.build()
|
||||
}
|
||||
|
@ -22,8 +22,7 @@ import hep.dataforge.workspace.tasks.TaskModel
|
||||
/**
|
||||
* @author Alexander Nozik
|
||||
*/
|
||||
object NumassFitScanTask : AbstractTask<FitResult>() {
|
||||
|
||||
object NumassFitScanTask : AbstractTask<FitResult>(FitResult::class.java) {
|
||||
|
||||
override fun run(model: TaskModel, data: DataNode<*>): DataNode<FitResult> {
|
||||
val config = model.meta
|
||||
|
@ -27,7 +27,7 @@ import inr.numass.actions.SummaryAction
|
||||
/**
|
||||
* Created by darksnake on 16-Sep-16.
|
||||
*/
|
||||
object NumassFitSummaryTask : AbstractTask<Table>() {
|
||||
object NumassFitSummaryTask : AbstractTask<Table>(Table::class.java) {
|
||||
override val name: String = "summary"
|
||||
|
||||
override fun run(model: TaskModel, data: DataNode<*>): DataNode<out Table> {
|
||||
|
Loading…
Reference in New Issue
Block a user