Package uk.ac.gda.tomography.devices
Interface ITomographyDetector
- All Superinterfaces:
Findable
- All Known Implementing Classes:
PCOTomography,TomographyDetectorSimulator
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 Summary
Modifier and TypeMethodDescriptionvoidabort()This is called when the acquisition and any file capture activities need to be stopped.voidacquireMJpeg(Double acqTime, int binX, int binY, Double scale, Double offset) The MJpeg streamer is set-up and made ready.demandRaw(Double acqTime, String demandRawFilePath, String demandRawFileName, Boolean isHdf, Boolean isFlatFieldCorrectionRequired, Boolean demandWhileStreaming) voidRequest to disable the dark subtraction flag on the area detector.voidSets the flat field correction on the proc plug-ins of the detector to "disabled".voidRequest to enable the dark subtraction flag on the area detector.voidSets the flat field correction on the proc plug-ins of the detector to "enabled".doublevoidInvoked 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.booleanbooleanvoidReset the values of minY and maxY the initial valuesvoidresetAll()In addition to its own resets, this method also calls reset on all pluginsvoidResets only the file formatvoidmethod called when acquisition is stopped to update exposure time - should continue where it left offvoidsetExposureTime(double collectionTime) Exposure time on the detector to be set when this method is invoked.voidThe PCO detector can be controlled using an external hardware trigger - however, for the tomography alignment it is important that this is set tofalsevoidsetHdfFormat(boolean hdfFormat) Sets the file saver format to hdf.voidsetOffsetAndScale(double offset, double scale) Set offset and scale on the proc plugins of the detector.voidsetProc1Scale(double newScale) Update the scale value on the proc1 plugin.voidsetProcScale(double factor) Sets the proc scale factor to the given valuevoidsetRoi1ScalingDivisor(double divisor) Set the scaling divisor on the ROI1voidsetTiffFileNumber(int fileNumber) Sets the file number on the tiff plugin - this will be used when the plugin writes a tiff file the next time.voidsetupForTilt(int minY, int maxY, int minX, int maxX) 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.voidsetupHistoStatCollection(int binSize) method invoked to call histogram stat collectionvoidsetupZoomMJpeg(Rectangle roi, Point bin) This sets up the MJpeg streamer for the zoomed images.voidsetZoomRoiStart(Point roiStart) Set roi2 roiStart to the values provided.takeDark(int numberOfImages, double acqTime, String fileLocation, String fileName, String filePathTemplate) This method is invoked when dark images need to be taken.takeFlat(double expTime, int numberOfImages, String fileLocation, String fileName, String filePathTemplate) This method is invoked when a flat image needs to be taken
-
Method Details
-
setExposureTime
Exposure time on the detector to be set when this method is invoked.- Parameters:
collectionTime-- Throws:
Exception
-
acquireMJpeg
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
Set roi2 roiStart to the values provided.- Parameters:
roiStart-- Throws:
Exception
-
setupZoomMJpeg
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
- Returns:
- roi1BinX - the bin X value from the roi1 plugin of the detector.
- Throws:
Exception
-
getRoi2BinX
- Returns:
- roi2BinX - the bin X value from the roi1 plugin of the detector.
- Throws:
Exception
-
enableFlatField
Sets the flat field correction on the proc plug-ins of the detector to "enabled".- Throws:
Exception
-
disableFlatField
Sets the flat field correction on the proc plug-ins of the detector to "disabled".- Throws:
Exception
-
getTiffFilePath
- 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
- Returns:
- tiff file name - the file name of the most recent tiff collected.
- Throws:
Exception
-
getTiffFileTemplate
- Returns:
- tiff file template - the template for writing a tiff file.
- Throws:
Exception
-
setTiffFileNumber
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 timedemandRawFilePath- - the file path (folder) where the file needs to be saved - this is set on the tiff filepathdemandRawFileName- - 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
- 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
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
Resets only the file format- Throws:
Exception
-
isHdfFormat
boolean isHdfFormat()- Returns:
- true if the file saving format is 'hdf'.
-
resetAll
In addition to its own resets, this method also calls reset on all plugins- Throws:
Exception
-
setupForTilt
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 valuemaxY- - the maximum y valueminX-maxX-- Throws:
Exception
-
resetAfterTiltToInitialValues
Reset the values of minY and maxY the initial values- Throws:
Exception
-
setProcScale
Sets the proc scale factor to the given value- Parameters:
factor- - value to which the proc scale should be set- Throws:
Exception
-
setRoi1ScalingDivisor
Set the scaling divisor on the ROI1- Parameters:
divisor-- Throws:
Exception
-
getDetectorName
String getDetectorName()- Returns:
- name - name of the detector.
-
isAcquiring
- Returns:
- true if the detector is busy; false otherwise.
- Throws:
DeviceException
-
setExternalTriggered
The PCO detector can be controlled using an external hardware trigger - however, for the tomography alignment it is important that this is set tofalse- Parameters:
val-
-
initDetector
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
Request to disable the dark subtraction flag on the area detector.- Throws:
Exception
-
enableDarkSubtraction
Request to enable the dark subtraction flag on the area detector.- Throws:
Exception
-
getProc1Scale
- Returns:
- scale value from the proc1 plugin.
- Throws:
Exception
-
setProc1Scale
Update the scale value on the proc1 plugin.- Parameters:
newScale-- Throws:
Exception
-
setOffsetAndScale
Set offset and scale on the proc plugins of the detector.- Parameters:
offset-scale-- Throws:
Exception
-
resumeAcquisition
method called when acquisition is stopped to update exposure time - should continue where it left off- Throws:
Exception
-
setupHistoStatCollection
method invoked to call histogram stat collection- Throws:
Exception
-