Class TfgScalerWithDarkCurrent

All Implemented Interfaces:
CounterTimer, Detector, DarkCurrentDetector, Device, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable
Direct Known Subclasses:
TfgScalerWithLogValues, TFGScalerWithRatio

public abstract class TfgScalerWithDarkCurrent extends TfgScaler implements DarkCurrentDetector
See Also:
  • Constructor Details

    • TfgScalerWithDarkCurrent

      public TfgScalerWithDarkCurrent()
  • Method Details

    • acquireDarkCurrent

      public void acquireDarkCurrent() throws Exception
      Reads and sets the darkCurrent
      Throws:
      DeviceException
      Exception
    • atScanStart

      public void atScanStart() throws DeviceException
      Reads the dark current.
      Specified by:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atScanEnd

      public void atScanEnd() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the end of a group of nested scans (or a single scan if that is the case).

      Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See Scannable.atCommandFailure() Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.

      Specified by:
      atScanEnd in interface Scannable
      Overrides:
      atScanEnd in class TfgScaler
      Throws:
      DeviceException
      See Also:
    • setDarkCurrent

      public void setDarkCurrent(DarkCurrentResults darkCurrent)
    • getDarkCurrentResults

      public DarkCurrentResults getDarkCurrentResults()
      Specified by:
      getDarkCurrentResults in interface DarkCurrentDetector
      Returns:
      results from Dark Current reading, typically ordered I0, It, Iref
    • getDarkCurrent

      public Double[] getDarkCurrent()
    • isDarkCurrentRequired

      public boolean isDarkCurrentRequired()
    • setDarkCurrentRequired

      public void setDarkCurrentRequired(boolean darkCurrentRequired)
    • setDarkCurrentCollectionTime

      public void setDarkCurrentCollectionTime(Double darkCurrentCollectionTime)
    • getDarkCurrentCollectionTime

      public Double getDarkCurrentCollectionTime()
    • isUseReset

      public boolean isUseReset()
    • setUseReset

      public void setUseReset(boolean useReset)
      True by default, set to false if the shutter used to collect the dark current should not have reset called before opening.
      Parameters:
      useReset -
    • adjustForDarkCurrent

      protected double[] adjustForDarkCurrent(double[] values, Double collectionTime)
    • adjustChannelForDarkCurrent

      protected Double adjustChannelForDarkCurrent(Double rawCounts, Double dkCounts, Double collectionTime)