Package gda.device.detector.pco
Class PCOTomography
java.lang.Object
gda.factory.FindableBase
gda.device.detector.pco.PCOTomography
- All Implemented Interfaces:
Findable,ITomographyDetector
@ServiceInterface(ITomographyDetector.class)
public class PCOTomography
extends FindableBase
implements ITomographyDetector
Tomography implementation for the PCO camera.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()This is called when the acquisition and any file capture activities need to be stopped.voidacquireMJpeg(Double expTime, 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".doubledoublevoidInvoked 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.voidsetMaxIntensity(double maxIntensity) voidsetOffsetAndScale(double offset, double scale) Set offset and scale on the proc plugins of the detector.voidsetPcoDetector(IPCODetector pcoDetector) 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 acqTime, int numberOfImages, String fileLocation, String fileName, String filePathTemplate) This method is invoked when a flat image needs to be takenMethods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
PCOTomography
public PCOTomography()
-
-
Method Details
-
getPcoDetector
-
setPcoDetector
-
setExposureTime
Description copied from interface:ITomographyDetectorExposure time on the detector to be set when this method is invoked.- Specified by:
setExposureTimein interfaceITomographyDetector- Parameters:
collectionTime-- Throws:
Exception
-
acquireMJpeg
public void acquireMJpeg(Double expTime, int binX, int binY, Double scale, Double offset) throws Exception Description copied from interface:ITomographyDetectorThe 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- Specified by:
acquireMJpegin interfaceITomographyDetector- Parameters:
expTime-binX-binY-scale-offset-- Throws:
Exception
-
resumeAcquisition
Description copied from interface:ITomographyDetectormethod called when acquisition is stopped to update exposure time - should continue where it left off- Specified by:
resumeAcquisitionin interfaceITomographyDetector- Throws:
Exception
-
setZoomRoiStart
Description copied from interface:ITomographyDetectorSet roi2 roiStart to the values provided.- Specified by:
setZoomRoiStartin interfaceITomographyDetector- Parameters:
roiStart-- Throws:
Exception
-
setupZoomMJpeg
Description copied from interface:ITomographyDetectorThis 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.- Specified by:
setupZoomMJpegin interfaceITomographyDetector- Parameters:
roi-bin-- Throws:
Exception
-
getRoi1BinX
- Specified by:
getRoi1BinXin interfaceITomographyDetector- Returns:
- roi1BinX - the bin X value from the roi1 plugin of the detector.
- Throws:
Exception
-
getRoi2BinX
- Specified by:
getRoi2BinXin interfaceITomographyDetector- Returns:
- roi2BinX - the bin X value from the roi1 plugin of the detector.
- Throws:
Exception
-
enableFlatField
Description copied from interface:ITomographyDetectorSets the flat field correction on the proc plug-ins of the detector to "enabled".- Specified by:
enableFlatFieldin interfaceITomographyDetector- Throws:
Exception
-
disableFlatField
Description copied from interface:ITomographyDetectorSets the flat field correction on the proc plug-ins of the detector to "disabled".- Specified by:
disableFlatFieldin interfaceITomographyDetector- Throws:
Exception
-
getTiffFilePath
- Specified by:
getTiffFilePathin interfaceITomographyDetector- 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
- Specified by:
getTiffFileNamein interfaceITomographyDetector- Returns:
- tiff file name - the file name of the most recent tiff collected.
- Throws:
Exception
-
getTiffFileTemplate
- Specified by:
getTiffFileTemplatein interfaceITomographyDetector- Returns:
- tiff file template - the template for writing a tiff file.
- Throws:
Exception
-
setTiffFileNumber
Description copied from interface:ITomographyDetectorSets the file number on the tiff plugin - this will be used when the plugin writes a tiff file the next time.- Specified by:
setTiffFileNumberin interfaceITomographyDetector- Parameters:
fileNumber-- Throws:
Exception
-
demandRaw
public String demandRaw(Double acqTime, String demandRawFilePath, String demandRawFileName, Boolean isHdf, Boolean isFlatFieldCorrectionRequired, Boolean demandWhileStreaming) throws Exception - Specified by:
demandRawin interfaceITomographyDetector- 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
public String takeFlat(double acqTime, int numberOfImages, String fileLocation, String fileName, String filePathTemplate) throws Exception Description copied from interface:ITomographyDetectorThis method is invoked when a flat image needs to be taken- Specified by:
takeFlatin interfaceITomographyDetector- Parameters:
acqTime- - 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
- Specified by:
getTiffImageFileNamein interfaceITomographyDetector- Returns:
- tiff image name depending on the os env of the ioc.
- Throws:
Exception
-
takeDark
public String takeDark(int numberOfImages, double acqTime, String fileLocation, String fileName, String filePathTemplate) throws Exception Description copied from interface:ITomographyDetectorThis method is invoked when dark images need to be taken.- Specified by:
takeDarkin interfaceITomographyDetector- Parameters:
numberOfImages- - number of dark images to be taken.acqTime- - exposure time at which the dark image should be captured.- Throws:
Exception
-
abort
Description copied from interface:ITomographyDetectorThis is called when the acquisition and any file capture activities need to be stopped.- Specified by:
abortin interfaceITomographyDetector- Throws:
Exception
-
setHdfFormat
public void setHdfFormat(boolean hdfFormat) Description copied from interface:ITomographyDetectorSets the file saver format to hdf. The detector then delegates any file saving activity to the hdf plugin on the detector.- Specified by:
setHdfFormatin interfaceITomographyDetector- Parameters:
hdfFormat-
-
resetFileFormat
Description copied from interface:ITomographyDetectorResets only the file format- Specified by:
resetFileFormatin interfaceITomographyDetector- Throws:
Exception
-
isHdfFormat
public boolean isHdfFormat()- Specified by:
isHdfFormatin interfaceITomographyDetector- Returns:
- true if the file saving format is 'hdf'.
-
resetAll
Description copied from interface:ITomographyDetectorIn addition to its own resets, this method also calls reset on all plugins- Specified by:
resetAllin interfaceITomographyDetector- Throws:
Exception
-
setupForTilt
Description copied from interface:ITomographyDetectorThe 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.- Specified by:
setupForTiltin interfaceITomographyDetector- Parameters:
minY- - the minimum y valuemaxY- - the maximum y valueminX-maxX-- Throws:
Exception
-
resetAfterTiltToInitialValues
Description copied from interface:ITomographyDetectorReset the values of minY and maxY the initial values- Specified by:
resetAfterTiltToInitialValuesin interfaceITomographyDetector- Throws:
Exception
-
setProcScale
Description copied from interface:ITomographyDetectorSets the proc scale factor to the given value- Specified by:
setProcScalein interfaceITomographyDetector- Parameters:
factor- - value to which the proc scale should be set- Throws:
Exception
-
setRoi1ScalingDivisor
Description copied from interface:ITomographyDetectorSet the scaling divisor on the ROI1- Specified by:
setRoi1ScalingDivisorin interfaceITomographyDetector- Parameters:
divisor-- Throws:
Exception
-
getMaxIntensity
public double getMaxIntensity() -
setMaxIntensity
public void setMaxIntensity(double maxIntensity) -
getDetectorName
- Specified by:
getDetectorNamein interfaceITomographyDetector- Returns:
- name - name of the detector.
-
isAcquiring
- Specified by:
isAcquiringin interfaceITomographyDetector- Returns:
- true if the detector is busy; false otherwise.
- Throws:
DeviceException
-
setExternalTriggered
Description copied from interface:ITomographyDetectorThe PCO detector can be controlled using an external hardware trigger - however, for the tomography alignment it is important that this is set tofalse- Specified by:
setExternalTriggeredin interfaceITomographyDetector- Parameters:
val-
-
initDetector
Description copied from interface:ITomographyDetectorInvoked 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.- Specified by:
initDetectorin interfaceITomographyDetector- Throws:
Exception
-
disableDarkSubtraction
Description copied from interface:ITomographyDetectorRequest to disable the dark subtraction flag on the area detector.- Specified by:
disableDarkSubtractionin interfaceITomographyDetector- Throws:
Exception
-
enableDarkSubtraction
Description copied from interface:ITomographyDetectorRequest to enable the dark subtraction flag on the area detector.- Specified by:
enableDarkSubtractionin interfaceITomographyDetector- Throws:
Exception
-
getProc1Scale
- Specified by:
getProc1Scalein interfaceITomographyDetector- Returns:
- scale value from the proc1 plugin.
- Throws:
Exception
-
setProc1Scale
Description copied from interface:ITomographyDetectorUpdate the scale value on the proc1 plugin.- Specified by:
setProc1Scalein interfaceITomographyDetector- Parameters:
newScale-- Throws:
Exception
-
setOffsetAndScale
Description copied from interface:ITomographyDetectorSet offset and scale on the proc plugins of the detector.- Specified by:
setOffsetAndScalein interfaceITomographyDetector- Parameters:
offset-scale-- Throws:
Exception
-
setupHistoStatCollection
Description copied from interface:ITomographyDetectormethod invoked to call histogram stat collection- Specified by:
setupHistoStatCollectionin interfaceITomographyDetector- Throws:
Exception
-