More fliexible datanode api
This commit is contained in:
parent
296308f8e8
commit
0547285f4c
@ -18,8 +18,8 @@ import org.apache.commons.math3.random.JDKRandomGenerator
|
|||||||
rnd = new JDKRandomGenerator();
|
rnd = new JDKRandomGenerator();
|
||||||
|
|
||||||
//Loading data
|
//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_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_2_wide\\set_7")
|
||||||
if (!dataDir.exists()) {
|
if (!dataDir.exists()) {
|
||||||
println "dataDir directory does not exist"
|
println "dataDir directory does not exist"
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import hep.dataforge.io.ColumnedDataWriter
|
|||||||
import hep.dataforge.tables.Table
|
import hep.dataforge.tables.Table
|
||||||
import inr.numass.storage.NumassData
|
import inr.numass.storage.NumassData
|
||||||
import inr.numass.storage.NumassDataLoader
|
import inr.numass.storage.NumassDataLoader
|
||||||
|
import inr.numass.storage.RawNMPoint
|
||||||
import inr.numass.utils.UnderflowCorrection
|
import inr.numass.utils.UnderflowCorrection
|
||||||
|
|
||||||
//File dataDir = new File("D:\\Work\\Numass\\data\\2016_04\\T2_data\\Fill_2_2\\set_7_b2a3433e54010000")
|
//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 = NumassDataLoader.fromLocalDir(null, dataDir)
|
||||||
//NumassData data = NMFile.readFile(new File("D:\\Work\\Numass\\sterilie2013-2014\\dat\\2013\\SCAN06.DAT" ))
|
//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")
|
ColumnedDataWriter.writeDataSet(System.out, t, "underflow parameters")
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ import inr.numass.actions.PrepareDataAction;
|
|||||||
import inr.numass.storage.NumassData;
|
import inr.numass.storage.NumassData;
|
||||||
import inr.numass.storage.NumassDataLoader;
|
import inr.numass.storage.NumassDataLoader;
|
||||||
import inr.numass.storage.NumassStorage;
|
import inr.numass.storage.NumassStorage;
|
||||||
import inr.numass.storage.SetDirectionUtility;
|
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
@ -88,7 +87,7 @@ public class NumassPrepareTask extends AbstractTask<Table> {
|
|||||||
|
|
||||||
boolean forwardOnly = meta.getBoolean("forwardOnly", false);
|
boolean forwardOnly = meta.getBoolean("forwardOnly", false);
|
||||||
boolean reverseOnly = meta.getBoolean("reverseOnly", false);
|
boolean reverseOnly = meta.getBoolean("reverseOnly", false);
|
||||||
SetDirectionUtility.load(context);
|
// SetDirectionUtility.load(context);
|
||||||
|
|
||||||
DataSet.Builder<NumassData> builder = DataSet.builder(NumassData.class);
|
DataSet.Builder<NumassData> builder = DataSet.builder(NumassData.class);
|
||||||
callback.setMaxProgress(StorageUtils.loaderStream(storage).count());
|
callback.setMaxProgress(StorageUtils.loaderStream(storage).count());
|
||||||
@ -120,7 +119,7 @@ public class NumassPrepareTask extends AbstractTask<Table> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
//FIXME remove in later revisions
|
//FIXME remove in later revisions
|
||||||
SetDirectionUtility.save(context);
|
// SetDirectionUtility.save(context);
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user