Package gda.device

Interface Detector

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable, Scannable
All Known Subinterfaces:
Analyser, AsynchronousDetector, BufferedDetector, CoboldDetector, CounterTimer, DataLogger, EdeDetector, EpicsAreaDetector, EpicsMcsSis3820, EtlDetector, FrelonDetector, HardwareTriggerableDetector, HardwareTriggeredDetector, HardwareTriggeredNexusXmap, IAravisCamera, IEDXDElement, IEpicsMCA, IEpicsMCASimple, IMythenDetector, IPCODetector, IPixiumDetector, Mar345, Mythen, NcdDetector, NexusDetector, NXPluginDetector, ODCCD, PCO4000, Pilatus, SimulatedBufferedDetector, StripDetector, VariableCollectionTimeDetector, XCHIPDetector, XmapDetector, Xspress3, Xspress3Mini, XspressDetector, XspressFluorescenceDetector
All Known Implementing Classes:
AbstractKeithley6400Series, AbstractWriteRegionsImmediatelyNXDetector, AceApdDetector, ADCameraDetector, ADCameraDetector, ADCMonitor, ADDetector, AdDetectorExtRoiDraw, ADPco, ADPilatus, AnalyserBase, AndorZylaDetector, AravisCamera, AsciiReaderDetector, BufferedEdeDetector, BufferedNXDetector, BufferedPandaDetector, BufferedScaler, BufferedScannablePositions, CallableTfgScalerWithLogValues, CallableTfgXmap, CallableTfgXspress2, CallableXmap, Cam4Detector, CoboldTDC, CounterTimerBase, DatasetNexusDetector, DataSocketDetector, DetectorBase, DummyBufferedDetector, DummyCoboldTDC, DummyCounterTimer, DummyDetector, DummyEpicsMcaForXmap, DummyEtlDetector, DummyHardwareTriggerableAreaDetector, DummyHardwareTriggerableDetector, DummyHardwareTriggerableDetectorBase, DummyHardwareTriggerableSimpleDetector, DummyHardwareTriggeredDetector, DummyHardwareTriggeredNexusXmap, DummyHardwareTriggerProvider, DummyImageCreator, DummyKeithley2600AverageMode, DummyKeithley2600SweepMode, DummyKeithley6487, DummyMandelbrotMappingDetector, DummyNexusDetector, DummyNXDetector, DummyPilatus, DummyScalarChannelDetector, DummyXmapBufferedDetector, DummyXmapEDXDMappingController, DummyXspress3Detector, DummyXspress3MiniDetector, EdeDetectorBase, EdeDummyDetector, EdeFrelon, EDXD, EDXDController, EDXDControllerQMap, EDXDElement, EDXDMappingController, EDXDMappingElement, EpicsBekhoffAdc, EpicsDetector, EpicsFemtoWithBekhoffAdc, EpicsMCA, EpicsMCA2, EpicsMCACounterTimer, EpicsMCASimple, EpicsMultiChannelScaler, EpicsPilatus, EpicsScaler, EpicsScalerSimple, EpicsScanData, ETLDetector, GeFanuc110BLADC, HardwareTriggerableADDetector, HardwareTriggerableDetectorBase, HardwareTriggeredNexusXmapImpl, HardwareTriggeredNXDetector, HardwareTriggeredNXDetectorWithReadoutTime, HardwareTriggeredNXDetectorWithReadoutTimeAndVariableCollectionTime, HardwareTriggeredXspress3Detector, I21Detector, IPPserver, Keithley2600SeriesAverageMode, Keithley2600SeriesSweepMode, Keithley6487, MbsAnalyser, MerlinDetector, MirrorCommissioningDetector, MjpegDetector, MoveableImageDetector, MythenDetector, MythenDetectorImpl, MythenNexusImpl, NcdDetectorSystem, NexusDetectorProcessor, NexusXmap, NXDetector, NXDetectorSnappingDecorator, ODCCDController, OdinDetector, OfflineCoboldTDC, PandaDetector, PassthroughDetectorWrapper, PCO4000, PCODetector, PixiumNXDetector, PositionStreamingTfgScaler, PulseTube, QexafsFFoverIO, QexafsGMSDOverI0, ReadbackDemandDifference, RoiExtractor, SesoXbpmDetector, ShutterControlledMythenDetectorImpl, SimpleDummyNexusDetector, SpecsPhoibosAnalyser, SpecsPhoibosAnalyserSeparateIterations, SpecsPhoibosSolsticeAnalyser, StepScanEdeDetector, SummingMythenDetector, TFGCounterTimer, TfgEncoderCounter, TfgEpicsMCACounterTimer, TfgFFoverI0, TfgScaler, TfgScalerWithDarkCurrent, TfgScalerWithFrames, TfgScalerWithLogValues, TFGScalerWithRatio, TFGStruck, TFGTriggeredScaler, TfgXmap, TfgXMapFFoverI0, TfgXspress2, TfgXspress2NoCorrection, TfgXspress2Raw, TimeResolvedTFGDetector, VGScientaAnalyser, VGScientaAnalyserCamOnly, VGScientaAnalyserNXDetector, VGScientaAnalyserTotalOnly, VortexDetector, VortexQexafsFFIO, XesIf, XhDetector, Xmap, XmapBufferedDetector, XmapDetectorFromEpicsMca, XmapwithSlaveMode, Xspress2BufferedDetector, Xspress2Detector, Xspress3BufferedDetector, Xspress3Detector, Xspress3FFoverI0BufferedDetector, Xspress3FFoverI0Detector, Xspress3MiniDetector, Xspress3MiniSingleChannelDetector, Xspress3QexafsDetector, Xspress4BufferedDetector, Xspress4Detector, Xspress4OdinDetector, XspressSystem, ZebraExternallyTriggeredDetector

public interface Detector extends Scannable
Interface used by ScanBase and its descendents to control data collection from Devices. All devices which need to appear in scans must implement this interface.
  • Field Details

    • IDLE

      static final int IDLE
      Possible status value, indicates detector is idle.
      See Also:
    • BUSY

      static final int BUSY
      Possible status value, indicates detector is busy.
      See Also:
    • PAUSED

      static final int PAUSED
      Possible status value, indicates detector is busy, but in paused state
      See Also:
    • STANDBY

      static final int STANDBY
      Possible status value, indicates detector is not ready for use or needs configuring.
      See Also:
    • FAULT

      static final int FAULT
      Possible status value, indicates detector in an error state.
      See Also:
    • MONITORING

      static final int MONITORING
      Possible status value, equals BUSY but indicates something else too
      See Also:
  • Method Details

    • collectData

      void collectData() throws DeviceException
      Tells the detector to begin to collect a set of data, then returns immediately. Should cause the hardware to start collecting immediately: if there is any delay then detectors used in the same scan would collect over different times when beam conditions may differ.
      Throws:
      DeviceException
    • setCollectionTime

      void setCollectionTime(double time) throws DeviceException
      Sets the collection time, in seconds, to be used during the next call of collectData.
      Parameters:
      time - the collection time in seconds
      Throws:
      DeviceException
    • getCollectionTime

      double getCollectionTime() throws DeviceException
      Returns the time, in seconds, the detector collects for during the next call to collectData()
      Returns:
      double
      Throws:
      DeviceException
    • getStatus

      int getStatus() throws DeviceException
      Returns the current collecting state of the device.
      Returns:
      BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
      Throws:
      DeviceException
    • readout

      Object readout() throws DeviceException
      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 waitWhileBusy() and ConcurrentScan. Readout must block until the detector is ready to respond quickly to collectData() again.

      Returns:
      the data collected
      Throws:
      DeviceException
    • getFileStructure

      default NexusTreeProvider getFileStructure() throws DeviceException
      Returns the structure of the file. This is only needed if using NexusScanDataWriter#PROPERTY_NAME_CREATE_FILE_AT_SCAN_START is true. If null (default), then the detector is not compatible with this property and will throw an error. This must describe the nexus structure fields that the detector will later write to. *
      Returns:
      the nexus file structure
      Throws:
      DeviceException
    • waitWhileBusy

      void waitWhileBusy() throws DeviceException, InterruptedException
      Wait while the detector collects data. Should return as soon as the exposure completes and it is safe to move motors. i.e. counts must be safely latched either in hardware or software before returning.
      Specified by:
      waitWhileBusy in interface Scannable
      Throws:
      DeviceException
      InterruptedException
    • getDataDimensions

      int[] getDataDimensions() throws DeviceException
      Returns the dimensions of the data object returned by the readout() method.
      Returns:
      the dimensions of the data object returned by the readout() method
      Throws:
      DeviceException
    • prepareForCollection

      void prepareForCollection() throws DeviceException
      Method called before a scan starts. May be used to setup detector for collection, for example MAR345 uses this to erase.

      Note: it is recommended to not implement this method, but to implement one or both of Scannable.atScanLineStart() or Scannable.atScanStart() instead. Implementing this method may cause issues when the detector class is used in multi-dimensional scans.

      Throws:
      DeviceException
    • endCollection

      void endCollection() throws DeviceException
      Method called at the end of collection to tell detector when a scan has finished. Typically integrating detectors used in powder diffraction do not output until the end of the scan and need to be told when this happens.
      Throws:
      DeviceException
    • createsOwnFiles

      boolean createsOwnFiles() throws DeviceException
      Returns a value which indicates whether the detector creates its own files. If it does (return true) the readout() method returns the name of the latest file created as a string. If it does not (return false) the readout() method will return the data directly.
      Returns:
      true if readout() returns filenames
      Throws:
      DeviceException
    • getDescription

      String getDescription() throws DeviceException
      Returns:
      A description of the detector.
      Throws:
      DeviceException
    • getDetectorID

      String getDetectorID() throws DeviceException
      Returns:
      A identifier for this detector.
      Throws:
      DeviceException
    • getDetectorType

      String getDetectorType() throws DeviceException
      Returns:
      The type of detector.
      Throws:
      DeviceException