Class CVScan

All Implemented Interfaces:
INeXusInfoWriteable, Device, Scannable, ScannableMotion, Configurable, Findable, gda.observable.IObservable, gda.observable.IObserver

@ServiceInterface(Scannable.class) public class CVScan extends ScannableMotionBase implements gda.observable.IObserver
*
  • Specify Scriptcontroller instance to handle data file name changed event FileNumberEvent which facilitate server to client communication
    • Field Details

      • paused

        public volatile boolean paused
    • Constructor Details

      • CVScan

        public CVScan()
    • Method Details

      • configure

        public void configure() throws FactoryException
        Description copied from class: ConfigurableBase
        Default implementation for classes that do not have to do any specific configuration.
        Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
        Specified by:
        configure in interface Configurable
        Overrides:
        configure in class ConfigurableBase
        Throws:
        FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
      • rawAsynchronousMoveTo

        public void rawAsynchronousMoveTo(Object time) throws DeviceException
        Description copied from class: ScannableBase
        [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.
        Overrides:
        rawAsynchronousMoveTo in class ScannableBase
        Parameters:
        time - Position in its internal/hardware representation. e.g. with units and offsets removed
        Throws:
        DeviceException
        See Also:
      • restart

        public void restart() throws DeviceException
        Throws:
        DeviceException
      • rawGetPosition

        public Object rawGetPosition() throws DeviceException
        Description copied from class: ScannableBase
        [Consider abstract] Read the position in its internal (user) representation.
        Overrides:
        rawGetPosition in class ScannableBase
        Returns:
        the value represented by this Scannable
        Throws:
        DeviceException
        See Also:
      • getRebinnedFilePath

        public String getRebinnedFilePath()
      • getRawFilePath

        public String getRawFilePath()
      • isBusy

        public boolean isBusy()
        Description copied from class: ScannableMotionBase
        Check if the Scannable is moving/operating.. Calls onto rawIsBusy for historical reasons, although there is currently no need for this.
        Specified by:
        isBusy in interface Scannable
        Overrides:
        isBusy in class ScannableMotionBase
        Returns:
        true - if operation carried out by moveTo has not completed yet
        See Also:
      • atScanStart

        public void atScanStart() throws DeviceException
        Description copied from class: ScannableBase
        Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
        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 ScannableBase
        Throws:
        DeviceException
        See Also:
      • atPointStart

        public void atPointStart() throws DeviceException
        Description copied from class: ScannableBase
        Called on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
        Specified by:
        atPointStart in interface Scannable
        Overrides:
        atPointStart in class ScannableBase
        Throws:
        DeviceException
        See Also:
      • atPointEnd

        public void atPointEnd() throws DeviceException
        Description copied from class: ScannableBase
        Called on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
        Specified by:
        atPointEnd in interface Scannable
        Overrides:
        atPointEnd in class ScannableBase
        Throws:
        DeviceException
        See Also:
      • stop

        public void stop() throws DeviceException
        Description copied from class: ScannableBase
        Stop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
        Specified by:
        stop in interface Scannable
        Overrides:
        stop in class ScannableBase
        Throws:
        DeviceException
        See Also:
      • setCVScanProfile

        public void setCVScanProfile(String profile) throws DeviceException
        set or change CVScan profile
        Throws:
        DeviceException
      • getCVScanProfile

        public String getCVScanProfile() throws DeviceException
        gets current CVScan profile
        Returns:
        CVScan profile name
        Throws:
        DeviceException
      • getAvailableCVScanProfiles

        public ArrayList<String> getAvailableCVScanProfiles() throws InterruptedException
        list CVScan profile available
        Returns:
        list of Profiles
        Throws:
        InterruptedException
      • reset

        public void reset() throws gov.aps.jca.CAException, InterruptedException
        reset the controller busy status to false if and only if locked to true.
        Throws:
        gov.aps.jca.CAException
        InterruptedException
      • set2ndMotorStartPosition

        public void set2ndMotorStartPosition(double position) throws DeviceException
        set the start position of the 2nd motor in current CVScan Profile.
        Parameters:
        position -
        Throws:
        DeviceException
      • get2ndMotorStartPosition

        public double get2ndMotorStartPosition() throws DeviceException
        get the start position of the 2nd motor in the current CVScan Profile
        Returns:
        start position of 2nd motor
        Throws:
        DeviceException
      • get2ndMotorScanRange

        public double get2ndMotorScanRange() throws DeviceException
        get the scan range of the 2nd motor in the current CVScan Profile.
        Returns:
        scan range of 2nf motor
        Throws:
        DeviceException
      • set2ndMotorScanRange

        public void set2ndMotorScanRange(double position) throws DeviceException
        set the scan range of 2nd motor in the current CVScan Profile.
        Parameters:
        position -
        Throws:
        DeviceException
      • update

        public void update(Object source, Object arg)
        Observer of Current State of EpicsCVScan object. On state updates to Reduction, kicks off a new threads to save raw data; on state updates to @{code Flyback}, kicks off a new thread to save rebinned data. Any other states just print message to the Jython terminal.
        Specified by:
        update in interface gda.observable.IObserver
      • addScannables

        public void addScannables(ArrayList<Scannable> scannableList)
        used to add scannables to cvscan which are passed to the MAC data writer to capture their values as metadata in the header.
        Parameters:
        scannableList -
      • addScannable

        public void addScannable(Scannable s)
      • removeScannable

        public void removeScannable(Scannable s)
      • removeAllScannables

        public void removeAllScannables()
      • getDetectors

        public ArrayList<Detector> getDetectors()
      • addDetector

        public void addDetector(Detector mcsDetector)
      • setDetectors

        public void setDetectors(ArrayList<Detector> mcsDetectors)
      • getController

        public EpicsCVScan getController()
      • setController

        public void setController(EpicsCVScan controller)
      • getBeamMonitor

        public IonChamberBeamMonitor getBeamMonitor()
      • setBeamMonitor

        public void setBeamMonitor(IonChamberBeamMonitor beamMonitor)
      • getPsdScannableMotor

        public Scannable getPsdScannableMotor()
      • setPsdScannableMotor

        public void setPsdScannableMotor(Scannable psdScannableMotor)
      • getPsdSafePosition

        public SafePosition getPsdSafePosition()
      • setPsdSafePosition

        public void setPsdSafePosition(SafePosition psdSafePosition)
      • getDataWriter

        public EpicsCVscanDataWriter getDataWriter()
      • setDataWriter

        public void setDataWriter(EpicsCVscanDataWriter dataWriter)
      • getScriptController

        public Scriptcontroller getScriptController()
      • setScriptController

        public void setScriptController(Scriptcontroller scriptController)
      • getSafePositionSetup

        public Callable<?> getSafePositionSetup()
      • setSafePositionSetup

        public void setSafePositionSetup(Callable<?> safePositionSetup)
      • isSumming

        public boolean isSumming()
      • setSumming

        public void setSumming(boolean summing)