Site fixed
This commit is contained in:
parent
badc119e78
commit
3127f1e7be
@ -3,6 +3,8 @@ package inr.numass.data;
|
||||
import hep.dataforge.tables.ListTable;
|
||||
import hep.dataforge.tables.Table;
|
||||
import hep.dataforge.values.Values;
|
||||
import inr.numass.data.api.NumassPoint;
|
||||
import inr.numass.data.api.NumassSet;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
@ -17,7 +19,7 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
public class NumassDataUtils {
|
||||
|
||||
public static Collection<NumassPoint> joinSpectra(Stream<NumassData> spectra) {
|
||||
public static Collection<NumassPoint> joinSpectra(Stream<NumassSet> spectra) {
|
||||
Map<Double, NumassPoint> map = new LinkedHashMap<>();
|
||||
spectra.forEach(datum -> {
|
||||
datum.forEach(point -> {
|
||||
|
@ -1,16 +1,19 @@
|
||||
package inr.numass.data.analyzers;
|
||||
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.tables.Table;
|
||||
import hep.dataforge.tables.TableFormat;
|
||||
import hep.dataforge.tables.TableFormatBuilder;
|
||||
import hep.dataforge.tables.ValueMap;
|
||||
import hep.dataforge.values.Values;
|
||||
import inr.numass.data.api.NumassAnalyzer;
|
||||
import inr.numass.data.api.NumassBlock;
|
||||
import inr.numass.data.api.NumassEvent;
|
||||
import inr.numass.data.api.SignalProcessor;
|
||||
import inr.numass.data.api.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static hep.dataforge.tables.XYAdapter.*;
|
||||
import static inr.numass.data.api.NumassPoint.HV_KEY;
|
||||
|
||||
/**
|
||||
* A simple event counter
|
||||
* Created by darksnake on 07.07.2017.
|
||||
@ -24,6 +27,7 @@ public class SimpleAnalyzer implements NumassAnalyzer {
|
||||
public SimpleAnalyzer(@Nullable SignalProcessor processor) {
|
||||
this.processor = processor;
|
||||
}
|
||||
|
||||
public SimpleAnalyzer() {
|
||||
this.processor = null;
|
||||
}
|
||||
@ -64,4 +68,19 @@ public class SimpleAnalyzer implements NumassAnalyzer {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Table analyze(NumassSet set, Meta config) {
|
||||
TableFormat format = new TableFormatBuilder()
|
||||
.addNumber(HV_KEY, X_VALUE_KEY)
|
||||
.addNumber("length")
|
||||
.addNumber("count")
|
||||
.addNumber(COUNT_RATE_KEY, Y_VALUE_KEY)
|
||||
.addNumber(COUNT_RATE_ERROR_KEY, Y_ERROR_KEY)
|
||||
.addColumn("window")
|
||||
.addTime()
|
||||
.build();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package inr.numass.data.api;
|
||||
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.tables.Table;
|
||||
import hep.dataforge.values.Values;
|
||||
|
||||
/**
|
||||
@ -20,5 +21,13 @@ public interface NumassAnalyzer {
|
||||
*/
|
||||
Values analyze(NumassBlock block, Meta config);
|
||||
|
||||
/**
|
||||
* Analyze the whole set
|
||||
* @param set
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
Table analyze(NumassSet set, Meta config);
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user