numass task fixes
This commit is contained in:
parent
50e2c00b7f
commit
c04a1780e8
@ -29,17 +29,17 @@ public class NumassFitScanTask extends AbstractTask<FitResult> {
|
|||||||
@Override
|
@Override
|
||||||
protected DataNode<FitResult> run(TaskModel model, DataNode<?> data) {
|
protected DataNode<FitResult> run(TaskModel model, DataNode<?> data) {
|
||||||
Meta config = model.meta();
|
Meta config = model.meta();
|
||||||
String scanParameter = config.getString("scan.parameter", "msterile2");
|
String scanParameter = config.getString("parameter", "msterile2");
|
||||||
|
|
||||||
Value scanValues;
|
Value scanValues;
|
||||||
if (config.hasValue("scan.masses")) {
|
if (config.hasValue("masses")) {
|
||||||
scanValues = Value.of(config.getValue("scan.masses")
|
scanValues = Value.of(config.getValue("masses")
|
||||||
.listValue().stream()
|
.listValue().stream()
|
||||||
.map(it -> Math.pow(it.doubleValue() * 1000, 2.0))
|
.map(it -> Math.pow(it.doubleValue() * 1000, 2.0))
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
scanValues = config.getValue("scan.values", Value.of("[2.5e5, 1e6, 2.25e6, 4e6, 6.25e6, 9e6]"));
|
scanValues = config.getValue("values", Value.of("[2.5e5, 1e6, 2.25e6, 4e6, 6.25e6, 9e6]"));
|
||||||
}
|
}
|
||||||
Action<Table, FitResult> action = new FitAction();
|
Action<Table, FitResult> action = new FitAction();
|
||||||
DataTree.Builder<FitResult> resultBuilder = DataTree.builder(FitResult.class);
|
DataTree.Builder<FitResult> resultBuilder = DataTree.builder(FitResult.class);
|
||||||
@ -79,6 +79,8 @@ public class NumassFitScanTask extends AbstractTask<FitResult> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void updateModel(TaskModel.Builder model, Meta meta) {
|
protected void updateModel(TaskModel.Builder model, Meta meta) {
|
||||||
|
model.configure(meta.getMetaOrEmpty("scan"));
|
||||||
|
model.configure(it->it.putNode(meta.getMetaOrEmpty("fit")));
|
||||||
if (meta.hasMeta("filter")) {
|
if (meta.hasMeta("filter")) {
|
||||||
model.dependsOn("filter", meta, "prepare");
|
model.dependsOn("filter", meta, "prepare");
|
||||||
} else if (meta.hasMeta("empty")) {
|
} else if (meta.hasMeta("empty")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user