Package gda.device.detector.countertimer
Class ScalerOutputProcessor
java.lang.Object
gda.device.detector.countertimer.ScalerOutputProcessor
Class to allow the output of a
TfgScalerWithLogValues to be
configured in a flexible way to produce single values, ratios, or log ratios.
Configuration is done using list of ScalerOutputProcessor.OutputConfig which specifies how each value in the readout is produced
(i.e. which scaler channel(s) to use and whether it is a 'raw' value, ratio etc)
- Since:
- 28/9/2017
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to specify properties of single output value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureScalerOutput(TfgScaler tfgScaler) Generates inputNames and outputFormat arrays according the output configuration and applies the aTfgScalerWithLogValuesby callingScannableBase.setExtraNames(String[])andScannableBase.setOutputFormat(String[])double[]getScalerReadout(double[] values) Processes the raw scaler values and generates an array of values as specified by output configuration (i.e.voidrestoreExtraNamesFormats(Scannable tfgScaler) voidsaveExtraNamesFormats(Scannable tfgScaler) voidsetOutputConfig(List<ScalerOutputProcessor.OutputConfig> outputConfig) voidsetTimeChannelName(String timeChannelName)
-
Constructor Details
-
ScalerOutputProcessor
public ScalerOutputProcessor()
-
-
Method Details
-
configureScalerOutput
Generates inputNames and outputFormat arrays according the output configuration and applies the aTfgScalerWithLogValuesby callingScannableBase.setExtraNames(String[])andScannableBase.setOutputFormat(String[])- Parameters:
tfgScaler-
-
saveExtraNamesFormats
-
restoreExtraNamesFormats
-
getScalerReadout
public double[] getScalerReadout(double[] values) Processes the raw scaler values and generates an array of values as specified by output configuration (i.e. series of single scaler value, ratio of two scaler values, or log ratio)- Parameters:
values- dark current correct scaler counts for each channel (first value might be time)- Returns:
- array of processed scaler values
-
getOutputConfig
-
setOutputConfig
-
getTimeChannelName
-
setTimeChannelName
-