Interface ITomographyDetector

All Superinterfaces:
Findable
All Known Implementing Classes:
PCOTomography, TomographyDetectorSimulator

public interface ITomographyDetector extends Findable
This class needs to be implements in order to get the Tomography alignment client working. The requirements by the graphical elements are such that the detector sends or sets the EPICS elements as asked. A good place to look for an implementation is "gda.device.detector.pco.PCOTomography" in the "uk.ac.gda.devices.pco" plug-in.
  • Method Details

    • setExposureTime

      void setExposureTime(double collectionTime) throws Exception
      Exposure time on the detector to be set when this method is invoked.
      Parameters:
      collectionTime -
      Throws:
      Exception
    • acquireMJpeg

      void acquireMJpeg(Double acqTime, int binX, int binY, Double scale, Double offset) throws Exception
      The MJpeg streamer is set-up and made ready. The detector acquisition is started in "Continuous" mode. The proc scale factor is set on the proc plugin
      Parameters:
      acqTime -
      binX -
      binY -
      scale -
      offset -
      Throws:
      Exception
    • setZoomRoiStart

      void setZoomRoiStart(Point roiStart) throws Exception
      Set roi2 roiStart to the values provided.
      Parameters:
      roiStart -
      Throws:
      Exception
    • setupZoomMJpeg

      void setupZoomMJpeg(Rectangle roi, Point bin) throws Exception
      This sets up the MJpeg streamer for the zoomed images. On the tomography alignment GUI the zoomed images are displayed on the right. The display ROI is set and the bin values are set.
      Parameters:
      roi -
      bin -
      Throws:
      Exception
    • getRoi1BinX

      Integer getRoi1BinX() throws Exception
      Returns:
      roi1BinX - the bin X value from the roi1 plugin of the detector.
      Throws:
      Exception
    • getRoi2BinX

      Integer getRoi2BinX() throws Exception
      Returns:
      roi2BinX - the bin X value from the roi1 plugin of the detector.
      Throws:
      Exception
    • enableFlatField

      void enableFlatField() throws Exception
      Sets the flat field correction on the proc plug-ins of the detector to "enabled".
      Throws:
      Exception
    • disableFlatField

      void disableFlatField() throws Exception
      Sets the flat field correction on the proc plug-ins of the detector to "disabled".
      Throws:
      Exception
    • getTiffFilePath

      String getTiffFilePath() throws Exception
      Returns:
      tillFilePath - the file location of the most recent tiff collected. The path is generally calculated using the location and the template.
      Throws:
      Exception
    • getTiffFileName

      String getTiffFileName() throws Exception
      Returns:
      tiff file name - the file name of the most recent tiff collected.
      Throws:
      Exception
    • getTiffFileTemplate

      String getTiffFileTemplate() throws Exception
      Returns:
      tiff file template - the template for writing a tiff file.
      Throws:
      Exception
    • setTiffFileNumber

      void setTiffFileNumber(int fileNumber) throws Exception
      Sets the file number on the tiff plugin - this will be used when the plugin writes a tiff file the next time.
      Parameters:
      fileNumber -
      Throws:
      Exception
    • demandRaw

      String demandRaw(Double acqTime, String demandRawFilePath, String demandRawFileName, Boolean isHdf, Boolean isFlatFieldCorrectionRequired, Boolean demandWhileStreaming) throws Exception
      Parameters:
      acqTime - - the exposure time
      demandRawFilePath - - the file path (folder) where the file needs to be saved - this is set on the tiff filepath
      demandRawFileName - - the filename that needs to be set on the tiff plugin.
      isHdf - - flag to say whether the file should be saved as a hdf or not.
      isFlatFieldCorrectionRequired - - flag to say whether flat field correction is required or not.
      demandWhileStreaming - - flag to say whether the demand raw must happen while the detector is in continuous streaming mode.
      Returns:
      fileName of the raw image - the complete file path of the file written by the file saver plugin of the detector.
      Throws:
      Exception
    • takeFlat

      String takeFlat(double expTime, int numberOfImages, String fileLocation, String fileName, String filePathTemplate) throws Exception
      This method is invoked when a flat image needs to be taken
      Parameters:
      expTime - - exposure time to be set on the detector.
      numberOfImages - - number of images to recurse through. Only the last should be saved to the file system.
      fileLocation - - Filepath of the tiff file that is saved after a flat image is captured.
      fileName - - file name of the tiff file that needs to be captured.
      filePathTemplate - - template of the tiff file that needs to be saved.
      Returns:
      the file name that the flat is saved to - the full file name(filePath + filename) of the tiff file that is saved to the file system.
      Throws:
      Exception
    • getTiffImageFileName

      String getTiffImageFileName() throws Exception
      Returns:
      tiff image name depending on the os env of the ioc.
      Throws:
      Exception
    • takeDark

      String takeDark(int numberOfImages, double acqTime, String fileLocation, String fileName, String filePathTemplate) throws Exception
      This method is invoked when dark images need to be taken.
      Parameters:
      numberOfImages - - number of dark images to be taken.
      acqTime - - exposure time at which the dark image should be captured.
      Throws:
      Exception
    • abort

      void abort() throws Exception
      This is called when the acquisition and any file capture activities need to be stopped.
      Throws:
      Exception
    • setHdfFormat

      void setHdfFormat(boolean hdfFormat)
      Sets the file saver format to hdf. The detector then delegates any file saving activity to the hdf plugin on the detector.
      Parameters:
      hdfFormat -
    • resetFileFormat

      void resetFileFormat() throws Exception
      Resets only the file format
      Throws:
      Exception
    • isHdfFormat

      boolean isHdfFormat()
      Returns:
      true if the file saving format is 'hdf'.
    • resetAll

      void resetAll() throws Exception
      In addition to its own resets, this method also calls reset on all plugins
      Throws:
      Exception
    • setupForTilt

      void setupForTilt(int minY, int maxY, int minX, int maxX) throws Exception
      The tilt alignment is generally done on a known sample - the data that needs to be collected can be cropped on the y axis so that data processing can be relieved of memory issues.
      Parameters:
      minY - - the minimum y value
      maxY - - the maximum y value
      minX -
      maxX -
      Throws:
      Exception
    • resetAfterTiltToInitialValues

      void resetAfterTiltToInitialValues() throws Exception
      Reset the values of minY and maxY the initial values
      Throws:
      Exception
    • setProcScale

      void setProcScale(double factor) throws Exception
      Sets the proc scale factor to the given value
      Parameters:
      factor - - value to which the proc scale should be set
      Throws:
      Exception
    • setRoi1ScalingDivisor

      void setRoi1ScalingDivisor(double divisor) throws Exception
      Set the scaling divisor on the ROI1
      Parameters:
      divisor -
      Throws:
      Exception
    • getDetectorName

      String getDetectorName()
      Returns:
      name - name of the detector.
    • isAcquiring

      boolean isAcquiring() throws DeviceException
      Returns:
      true if the detector is busy; false otherwise.
      Throws:
      DeviceException
    • setExternalTriggered

      void setExternalTriggered(Boolean val)
      The PCO detector can be controlled using an external hardware trigger - however, for the tomography alignment it is important that this is set to false
      Parameters:
      val -
    • initDetector

      void initDetector() throws Exception
      Invoked to initialise the detector properties - in case of the PCO detector, an image needs to be taken so that the array values are passed to all the plugins.
      Throws:
      Exception
    • disableDarkSubtraction

      void disableDarkSubtraction() throws Exception
      Request to disable the dark subtraction flag on the area detector.
      Throws:
      Exception
    • enableDarkSubtraction

      void enableDarkSubtraction() throws Exception
      Request to enable the dark subtraction flag on the area detector.
      Throws:
      Exception
    • getProc1Scale

      double getProc1Scale() throws Exception
      Returns:
      scale value from the proc1 plugin.
      Throws:
      Exception
    • setProc1Scale

      void setProc1Scale(double newScale) throws Exception
      Update the scale value on the proc1 plugin.
      Parameters:
      newScale -
      Throws:
      Exception
    • setOffsetAndScale

      void setOffsetAndScale(double offset, double scale) throws Exception
      Set offset and scale on the proc plugins of the detector.
      Parameters:
      offset -
      scale -
      Throws:
      Exception
    • resumeAcquisition

      void resumeAcquisition() throws Exception
      method called when acquisition is stopped to update exposure time - should continue where it left off
      Throws:
      Exception
    • setupHistoStatCollection

      void setupHistoStatCollection(int binSize) throws Exception
      method invoked to call histogram stat collection
      Throws:
      Exception