From 0547285f4c7dedd4bc6605efd9ea8c98c3855f57 Mon Sep 17 00:00:00 2001 From: darksnake Date: Wed, 7 Dec 2016 18:31:01 +0300 Subject: [PATCH] More fliexible datanode api --- .../src/main/groovy/inr/numass/scripts/SimulatePileup.groovy | 4 ++-- .../src/main/groovy/inr/numass/scripts/Underflow.groovy | 3 ++- .../main/java/inr/numass/workspace/NumassPrepareTask.java | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy index 8d7720e3..4241b909 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy @@ -18,8 +18,8 @@ import org.apache.commons.math3.random.JDKRandomGenerator rnd = new JDKRandomGenerator(); //Loading data -//File dataDir = new File("D:\\Work\\Numass\\data\\2016_10\\Fill_1\\set_28") -File dataDir = new File("D:\\Work\\Numass\\data\\2016_10\\Fill_2_wide\\set_7") +File dataDir = new File("D:\\Work\\Numass\\data\\2016_10\\Fill_1\\set_28") +//File dataDir = new File("D:\\Work\\Numass\\data\\2016_10\\Fill_2_wide\\set_7") if (!dataDir.exists()) { println "dataDir directory does not exist" } diff --git a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy index a3b41f74..5164993f 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy @@ -10,6 +10,7 @@ import hep.dataforge.io.ColumnedDataWriter import hep.dataforge.tables.Table import inr.numass.storage.NumassData import inr.numass.storage.NumassDataLoader +import inr.numass.storage.RawNMPoint import inr.numass.utils.UnderflowCorrection //File dataDir = new File("D:\\Work\\Numass\\data\\2016_04\\T2_data\\Fill_2_2\\set_7_b2a3433e54010000") @@ -21,6 +22,6 @@ if(!dataDir.exists()){ NumassData data = NumassDataLoader.fromLocalDir(null, dataDir) //NumassData data = NMFile.readFile(new File("D:\\Work\\Numass\\sterilie2013-2014\\dat\\2013\\SCAN06.DAT" )) -Table t = new UnderflowCorrection().fitAllPoints(data, 400, 650, 3100, 20); +Table t = new UnderflowCorrection().fitAllPoints(data, 400, 650, RawNMPoint.MAX_CHANEL, 20); ColumnedDataWriter.writeDataSet(System.out, t, "underflow parameters") diff --git a/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java b/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java index 0afdc3ed..1d30e03a 100644 --- a/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java +++ b/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java @@ -24,7 +24,6 @@ import inr.numass.actions.PrepareDataAction; import inr.numass.storage.NumassData; import inr.numass.storage.NumassDataLoader; import inr.numass.storage.NumassStorage; -import inr.numass.storage.SetDirectionUtility; import java.net.URI; @@ -88,7 +87,7 @@ public class NumassPrepareTask extends AbstractTask { boolean forwardOnly = meta.getBoolean("forwardOnly", false); boolean reverseOnly = meta.getBoolean("reverseOnly", false); - SetDirectionUtility.load(context); +// SetDirectionUtility.load(context); DataSet.Builder builder = DataSet.builder(NumassData.class); callback.setMaxProgress(StorageUtils.loaderStream(storage).count()); @@ -120,7 +119,7 @@ public class NumassPrepareTask extends AbstractTask
{ }); } //FIXME remove in later revisions - SetDirectionUtility.save(context); +// SetDirectionUtility.save(context); return builder; }