Class ScalerOutputProcessor

java.lang.Object
gda.device.detector.countertimer.ScalerOutputProcessor

public class ScalerOutputProcessor extends Object
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
  • Constructor Details

    • ScalerOutputProcessor

      public ScalerOutputProcessor()
  • Method Details

    • configureScalerOutput

      public void configureScalerOutput(TfgScaler tfgScaler)
      Generates inputNames and outputFormat arrays according the output configuration and applies the a TfgScalerWithLogValues by calling ScannableBase.setExtraNames(String[]) and ScannableBase.setOutputFormat(String[])
      Parameters:
      tfgScaler -
    • saveExtraNamesFormats

      public void saveExtraNamesFormats(Scannable tfgScaler)
    • restoreExtraNamesFormats

      public void restoreExtraNamesFormats(Scannable tfgScaler)
    • 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

      public List<ScalerOutputProcessor.OutputConfig> getOutputConfig()
    • setOutputConfig

      public void setOutputConfig(List<ScalerOutputProcessor.OutputConfig> outputConfig)
    • getTimeChannelName

      public String getTimeChannelName()
    • setTimeChannelName

      public void setTimeChannelName(String timeChannelName)