Misc
This commit is contained in:
parent
8dd7870220
commit
17f2470a03
@ -32,7 +32,7 @@ public class PKT8VirtualPort extends VirtualPort implements Metoid {
|
||||
case "s":
|
||||
String[] letters = {"a", "b", "c", "d", "e", "f", "g", "h"};
|
||||
for (String letter : letters) {
|
||||
Meta channelMeta = MetaUtils.findNodeByValue(meta(), "channel", "letter", Value.of(letter));
|
||||
Meta channelMeta = MetaUtils.findNodeByValue(meta(), "channel", "letter", Value.of(letter)).orElse(Meta.empty());
|
||||
|
||||
double average;
|
||||
double sigma;
|
||||
|
@ -28,16 +28,23 @@ public class SmartAnalyzer extends AbstractAnalyzer {
|
||||
@Override
|
||||
public Values analyze(NumassBlock block, Meta config) {
|
||||
//TODO add result caching
|
||||
//TODO do something more... smart... using information from point if block is point
|
||||
switch (config.getString("type", "simple")) {
|
||||
case "simple":
|
||||
return simpleAnalyzer.analyze(block, config);
|
||||
case "time":
|
||||
return timeAnalyzer.analyze(block, config);
|
||||
case "debunch":
|
||||
return debunchAnalyzer.analyze(block, config);
|
||||
default:
|
||||
throw new IllegalArgumentException("Analyzer not found");
|
||||
if(config.hasValue("type")) {
|
||||
switch (config.getString("type")) {
|
||||
case "simple":
|
||||
return simpleAnalyzer.analyze(block, config);
|
||||
case "time":
|
||||
return timeAnalyzer.analyze(block, config);
|
||||
case "debunch":
|
||||
return debunchAnalyzer.analyze(block, config);
|
||||
default:
|
||||
throw new IllegalArgumentException("Analyzer not found");
|
||||
}
|
||||
} else {
|
||||
if(config.hasValue("t0")){
|
||||
return timeAnalyzer.analyze(block,config);
|
||||
} else {
|
||||
return simpleAnalyzer.analyze(block,config);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import inr.numass.models.LossCalculator
|
||||
|
||||
LossCalculator loss = LossCalculator.instance()
|
||||
|
||||
def X = 0.34
|
||||
def X = 0.36
|
||||
|
||||
def lossProbs = loss.getGunLossProbabilities(X);
|
||||
|
||||
@ -30,11 +30,11 @@ printf("%8s\t%8s\t%8s\t%8s\t%n",
|
||||
*/
|
||||
|
||||
def singleScatter = loss.getSingleScatterFunction(
|
||||
12.587,
|
||||
11.11,
|
||||
1.20,
|
||||
11.02,
|
||||
2.43
|
||||
12.860,
|
||||
16.62,
|
||||
1.71,
|
||||
12.09,
|
||||
4.59
|
||||
);
|
||||
|
||||
for (double d = 0; d < 30; d += 0.3) {
|
||||
|
Loading…
Reference in New Issue
Block a user