This commit is contained in:
Alexander Nozik 2017-08-07 21:30:07 +03:00
parent 8dd7870220
commit 17f2470a03
3 changed files with 24 additions and 17 deletions

View File

@ -32,7 +32,7 @@ public class PKT8VirtualPort extends VirtualPort implements Metoid {
case "s": case "s":
String[] letters = {"a", "b", "c", "d", "e", "f", "g", "h"}; String[] letters = {"a", "b", "c", "d", "e", "f", "g", "h"};
for (String letter : letters) { 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 average;
double sigma; double sigma;

View File

@ -28,8 +28,8 @@ public class SmartAnalyzer extends AbstractAnalyzer {
@Override @Override
public Values analyze(NumassBlock block, Meta config) { public Values analyze(NumassBlock block, Meta config) {
//TODO add result caching //TODO add result caching
//TODO do something more... smart... using information from point if block is point if(config.hasValue("type")) {
switch (config.getString("type", "simple")) { switch (config.getString("type")) {
case "simple": case "simple":
return simpleAnalyzer.analyze(block, config); return simpleAnalyzer.analyze(block, config);
case "time": case "time":
@ -39,5 +39,12 @@ public class SmartAnalyzer extends AbstractAnalyzer {
default: default:
throw new IllegalArgumentException("Analyzer not found"); throw new IllegalArgumentException("Analyzer not found");
} }
} else {
if(config.hasValue("t0")){
return timeAnalyzer.analyze(block,config);
} else {
return simpleAnalyzer.analyze(block,config);
}
}
} }
} }

View File

@ -10,7 +10,7 @@ import inr.numass.models.LossCalculator
LossCalculator loss = LossCalculator.instance() LossCalculator loss = LossCalculator.instance()
def X = 0.34 def X = 0.36
def lossProbs = loss.getGunLossProbabilities(X); def lossProbs = loss.getGunLossProbabilities(X);
@ -30,11 +30,11 @@ printf("%8s\t%8s\t%8s\t%8s\t%n",
*/ */
def singleScatter = loss.getSingleScatterFunction( def singleScatter = loss.getSingleScatterFunction(
12.587, 12.860,
11.11, 16.62,
1.20, 1.71,
11.02, 12.09,
2.43 4.59
); );
for (double d = 0; d < 30; d += 0.3) { for (double d = 0; d < 30; d += 0.3) {