public class Discriminator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Discriminator.DiscriminatorOutput
A simple class to hold the result of the discriminator
|
| Modifier and Type | Field and Description |
|---|---|
static int |
default_slice |
| Constructor and Description |
|---|
Discriminator() |
| Modifier and Type | Method and Description |
|---|---|
static int |
booleanToInt(boolean value) |
static double |
dacToMillivolt(int amplitude)
Convert threshold in DAC units to millivolt units
|
static Discriminator.DiscriminatorOutput |
discriminatePatch(double[] data,
int thresholdInDAC,
int minTimeOverThresholdInSlices,
int skipFirst,
int skipLast)
Compute the first occurence of a signal that is above a given
thresholdInDAC and stays above it for
a requested time (minTimeOverThresholdInSlices). |
static Discriminator.DiscriminatorOutput[] |
discriminatePatches(double[][] data,
int thresholdInDAC,
int minTimeOverThreshold,
int skipFirst,
int skipLast)
loop over pixels patch by patch and discriminate each patch
|
static boolean[] |
discriminatorOutputsToTriggerPrimitiveArray(Discriminator.DiscriminatorOutput[] discriminatorOutputs)
Get the triggerPrimitive members from an array of DiscriminatorOutputs and return them as native boolean array
|
static int[] |
discriminatorOutputsToTriggerSliceArray(Discriminator.DiscriminatorOutput[] discriminatorOutputs)
Get the triggerSlice members from an array of DiscriminatorOutputs and return them as native int array
|
static int |
millivoltToDAC(double amplitude)
Convert amplitude in DAC units to millivolt units
|
public static Discriminator.DiscriminatorOutput discriminatePatch(double[] data, int thresholdInDAC, int minTimeOverThresholdInSlices, int skipFirst, int skipLast)
thresholdInDAC and stays above it for
a requested time (minTimeOverThresholdInSlices).data - timeseriesthresholdInDAC - thresholdInDAC of the discriminator in DACminTimeOverThresholdInSlices - minimum time (in unit slices) the signal has to stay above the threholdskipFirst - number of slices to ignore at the beginning of the time seriesskipLast - number of slices to ignore at the end of the time seriespublic static Discriminator.DiscriminatorOutput[] discriminatePatches(double[][] data, int thresholdInDAC, int minTimeOverThreshold, int skipFirst, int skipLast)
data - array with dimensions [n_patches][number_of_slices]thresholdInDAC - thresholdInDAC of the discriminator in DACminTimeOverThreshold - minimum time the signal has to stay above the threholdskipFirst - number of slices to ignore at the beginning of the time seriesskipLast - number of slices to ignore at the end of the time seriespublic static double dacToMillivolt(int amplitude)
amplitude - in DAC unitspublic static int millivoltToDAC(double amplitude)
amplitude - in millivolt unitspublic static int booleanToInt(boolean value)
public static int[] discriminatorOutputsToTriggerSliceArray(Discriminator.DiscriminatorOutput[] discriminatorOutputs)
discriminatorOutputs - array of DiscriminatorOutputspublic static boolean[] discriminatorOutputsToTriggerPrimitiveArray(Discriminator.DiscriminatorOutput[] discriminatorOutputs)
discriminatorOutputs - array of DiscriminatorOutputsCopyright © 2019. All rights reserved.