Package gda.scan

Class TurboXasScan

All Implemented Interfaces:
IConcurrentScanChild, NestableScan, Scan, ScanChild, Serializable

public class TurboXasScan extends ContinuousScan
A TurboXasScan is a type of Continuous scan which can perform multiple sweeps of a fast slit and collect the spectra for each sweep. It is designed to used with a TurboXasScannable object which contains a full definition of the experiment in a TurboXasParameters object, including timing group information in a List of TurboSlitTimingGroups. It can also be used with a ContinuouslyScannable, in which case the behaviour is like a regular ContinuousScan. (i.e. a single spectrum is collected).
  • A timing group comprises one or more spectra with the same time per spectrum (i.e. motor speed used for scan)
  • Each timing group can have a different time per spectrum.
  • The pulse streams for multiple spectra used for hardware triggered data collection are produced from the Zebra. The Zebra is configured by the TurboXasScannable being used, or assumed to be already configured before the scan start.
  • Data is added to the NeXus file one spectrum at a time after the motor move for each has been completed. by using multiple gates (i.e. one gate per spectrum).
  • Spectra are sent to Ede scan plot view in the client as they are collected.
  • See Also:
    • Constructor Details

    • Method Details

      • doCollection

        public void doCollection() throws Exception
        Description copied from interface: Scan
        The method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.
        Specified by:
        doCollection in interface Scan
        Overrides:
        doCollection in class ContinuousScan
        Throws:
        Exception
      • getNumRepetitions

        public int getNumRepetitions()
        Number of times the spectrum collection will be repeated. There will be one repetition per value in positionsForScan list.
        Returns:
        number of repetitions
      • endScan

        protected void endScan() throws DeviceException, InterruptedException
        Description copied from class: ScanBase
        This should be called by all scans when they have finished, including when an exception has been raised.
        Overrides:
        endScan in class ContinuousScan
        Throws:
        DeviceException
        InterruptedException
      • collectOneSpectrum

        public void collectOneSpectrum(boolean collectData) throws Exception
        Perform motor move and collect data for a single spectrum
        Parameters:
        collectData - run data collection after motor move has finished. If set to false, this generally means data collection should be happening in a separate thread.
        Throws:
        Exception
      • getDimension

        public int getDimension()
        Description copied from class: ScanBase
        default implementation. Classes that derive from ScanBase which want to support the reporting of scan dimensions -@see getDimensions need to override this method
        Specified by:
        getDimension in interface Scan
        Overrides:
        getDimension in class ContinuousScan
        Returns:
        the number of points of this scan object - the whole scan execution can be a hierarchy of parent scan objects and layers of child scan objects
        See Also:
      • readDetector

        protected Object[][] readDetector(BufferedDetector detector, int lowFrame, int highFrame) throws Exception, DeviceException
        Throws:
        Exception
        DeviceException
      • getTurboXasMotorParams

        public TurboXasMotorParameters getTurboXasMotorParams()
      • getDoTrajectoryScan

        public boolean getDoTrajectoryScan()
      • setDoTrajectoryScan

        public void setDoTrajectoryScan(boolean doTrajectoryScan)
      • getUseXspress3SwmrReadout

        public boolean getUseXspress3SwmrReadout()
      • setUseXspress3SwmrReadout

        public void setUseXspress3SwmrReadout(boolean useXspress3SwmrReadout)
      • getMaxNumScalerFramesPerCycle

        public int getMaxNumScalerFramesPerCycle()
        Get Maximum number of scaler frames of data that can be stored by Tfg
      • setMaxNumScalerFramesPerCycle

        public void setMaxNumScalerFramesPerCycle(int maxNumScalerFramesPerCycle)
        Set maximum number of scaler frames of data that can be stored by Tfg in single cycle (should be less than total than can be stored by tfg, typically invalid input: '<'1million
      • getCurrentPointCount

        public int getCurrentPointCount()
      • getScannablesToMonitor

        public List<Scannable> getScannablesToMonitor()
      • setScannablesToMonitor

        public void setScannablesToMonitor(List<Scannable> scannablesToMonitor)
      • addScannableToMonitor

        public void addScannableToMonitor(Scannable scannable)
      • getWriteAsciiDataAfterScan

        public boolean getWriteAsciiDataAfterScan()
      • setWriteAsciiDataAfterScan

        public void setWriteAsciiDataAfterScan(boolean writeAsciiDataAfterScan)
      • getAsciiDataWriter

        public AsciiWriter getAsciiDataWriter()
      • setDataWriter

        public void setDataWriter(AsciiWriter asciiWriter)
      • getDataNameToSelectInPlot

        public String getDataNameToSelectInPlot()
      • setDataNameToSelectInPlot

        public void setDataNameToSelectInPlot(String dataNameToSelectInPlot)
      • getPollIntervalMillis

        public int getPollIntervalMillis()
      • setPollIntervalMillis

        public void setPollIntervalMillis(int pollIntervalMillis)
        Poll time interval to use when waiting for new data to become available on detector(s)
        Parameters:
        pollIntervalMillis -
      • isTwoWayScan

        public boolean isTwoWayScan()
      • setTwoWayScan

        public void setTwoWayScan(boolean twoWayScan)
      • getShutter

        public Scannable getShutter()
        Returns:
        Shutter scannable opened and closed at start and end of scan.
      • setShutter

        public void setShutter(Scannable shutter)
        Set the shutter scannable to be opened and closed at start and end of the scan.
        Parameters:
        shutter -
      • getDatasetNamesToAverage

        public List<String> getDatasetNamesToAverage()
      • setDatasetNamesToAverage

        public void setDatasetNamesToAverage(List<String> datasetNamesToAverage)
      • getScannableToMove

        public Scannable getScannableToMove()
      • setScannableToMove

        public void setScannableToMove(Scannable scannableToMove)
      • getPositionsForScan

        public List<Object> getPositionsForScan()
      • setPositionsForScan

        public void setPositionsForScan(List<Object> positionsForScan)
      • getSpectrumEvents

        public Map<Integer,List<SpectrumEvent>> getSpectrumEvents()
      • addSpectrumEvent

        public void addSpectrumEvent(int spectrumNumber, Scannable scannable, Object position)
      • addSpectrumEvent

        public void addSpectrumEvent(int spectrumNumber, String scannableName, Object position)
      • getSpectrumEventTimeoutSecs

        public int getSpectrumEventTimeoutSecs()
      • setSpectrumEventTimeoutSecs

        public void setSpectrumEventTimeoutSecs(int spectrumEventTimeoutSecs)
      • setStatus

        void setStatus(Scan.ScanStatus status)
        To allow nests of scans to share a common status with each other.
        Parameters:
        status -