Class TfgScalerWithLogValues

All Implemented Interfaces:
CounterTimer, Detector, DarkCurrentDetector, Device, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable
Direct Known Subclasses:
BufferedScaler, CallableTfgScalerWithLogValues, PositionStreamingTfgScaler, TfgScalerWithFrames, TFGTriggeredScaler

public class TfgScalerWithLogValues extends TfgScalerWithDarkCurrent
A version of TfgScaler for Spectroscopy Ionchambers which assumes it has output channels (time),I0,It,Iref.

It has optional additional channels ln(I0/It) and ln(I0/Iref) It also reads the dark current at the scan start.

See Also:
  • Field Details

  • Constructor Details

    • TfgScalerWithLogValues

      public TfgScalerWithLogValues()
  • Method Details

    • isOutputLogValues

      public boolean isOutputLogValues()
      Returns:
      Returns the outputLogValues.
    • setOutputLogValues

      public void setOutputLogValues(boolean outputLogValues)
      When set to true ln(I0/It) and ln(I0/Iref) will be added to the output columns
      Parameters:
      outputLogValues - The outputLogValues to set.
    • getTotalChans

      public int getTotalChans() throws DeviceException
      Description copied from class: TfgScaler
      Returns the total number of available counter-timer readout channels that will be returned by calls to readChans() For a time-framing device it is the number of channels per frame. All counter-timers must fully implement this.
      Overrides:
      getTotalChans in class TfgScaler
      Returns:
      total number of readout channels
      Throws:
      DeviceException
    • readout

      public double[] readout() throws DeviceException
      Description copied from interface: Detector
      Returns the latest data collected. The size of the Object returned must be consistent with the values returned by getDataDimensions and getExtraNames.

      If LocalProperties.GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLY is true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. See Detector.waitWhileBusy() and ConcurrentScan. Readout must block until the detector is ready to respond quickly to Detector.collectData() again.

      Specified by:
      readout in interface Detector
      Overrides:
      readout in class TfgScaler
      Returns:
      the data collected
      Throws:
      DeviceException
      See Also:
    • performCorrections

      protected double[] performCorrections(double[] output) throws DeviceException
      Throws:
      DeviceException
    • readFrame

      public double[] readFrame(int frame) throws DeviceException
      Description copied from class: TfgScaler
      For a time framing counter-timer, read out from channel 0 beginning from the specified start frame number using all the scaler dimensions.
      Overrides:
      readFrame in class TfgScaler
      Parameters:
      frame - read this frame
      Returns:
      array of requested readout counter-timer data
      Throws:
      DeviceException
    • appendLogValues

      protected double[] appendLogValues(double[] output)
    • getI0ScalerChannel

      public int getI0ScalerChannel()
    • setI0ScalerChannel

      public void setI0ScalerChannel(int i0ScalerChannel)
    • getItScalerChannel

      public int getItScalerChannel()
    • setItScalerChannel

      public void setItScalerChannel(int itScalerChannel)
    • getiRefScalerChannel

      public int getiRefScalerChannel()
    • setiRefScalerChannel

      public void setiRefScalerChannel(int iRefScalerChannel)
    • setUseCustomisedOutput

      public void setUseCustomisedOutput(boolean useCustomisedOutput)
      Parameters:
      useCustomisedOutput - true - generate readout using ScalerOutputProcessor, false - use 'normal' readout. When setting from true to false the previous extraNames, outputformats are restored (if they have been previously set using saveExtraNamesFormats().
    • getUseCustomisedOutput

      public boolean getUseCustomisedOutput()
    • saveExtraNamesFormats

      public void saveExtraNamesFormats()
      Save the current output formats and extra names;
    • restoreExtraNamesFormats

      public void restoreExtraNamesFormats()
    • getScalerOutputConfig

      public List<ScalerOutputProcessor.OutputConfig> getScalerOutputConfig()
    • setScalerOutputConfig

      public void setScalerOutputConfig(List<ScalerOutputProcessor.OutputConfig> outputConfig)
    • addScalerOutputConfig

      public void addScalerOutputConfig(ScalerOutputProcessor.OutputConfig conf)
    • clearScalerOutputConfig

      public void clearScalerOutputConfig()
    • configureScalerOutputProcessor

      public void configureScalerOutputProcessor()
    • getScalerOutputProcessor

      public ScalerOutputProcessor getScalerOutputProcessor()
    • setTimeChannelName

      public void setTimeChannelName(String name)
    • getTimeChannelName

      public String getTimeChannelName()