Pilatus Detector System¶
The Pilatus X-ray detectors are programmable cameras. Py4Syn uses the standard area detector EPIC IOC for communicating with them. Since the IOC provides a high level API, most of the acquisition logic is implemented in the IOC. The camera is implemented as a standard ICountable, but instead of returning values to be plotted, the acquired images are stored into files.
Using EPICS Pilatus camera module¶
Usage of Python class for EPICS Pilatus cameras.
-
class
py4syn.epics.PilatusClass.
Pilatus
(mnemonic, pv)[source]¶ Class to control Pilatus cameras via EPICS.
Examples
>>> from shutil import move >>> from py4syn.epics.PilatusClass import Pilatus >>> from py4syn.epics.ShutterClass import SimpleShutter >>> >>> def getImage(pv, fileName='image.tif', shutter=''): ... shutter = SimpleShutter(shutter, shutter) ... camera = Pilatus('pilatus', pv) ... camera.setImageName('/remote/' + fileName) ... camera.setCountTime(10) ... camera.startCount() ... shutter.open() ... camera.wait() ... camera.stopCount() ... shutter.close() ... move('/remote/' + fileName, '/home/user/' + fileName) ... camera.close() ...
Constructor See
py4syn.epics.StandardDevice
Parameters: - mnemonic : string
A mnemonic for the camera
- pv : string
Base name of the EPICS process variable
-
getValue
(**kwargs)[source]¶ This is a dummy method that always returns zero, which is part of the
py4syn.epics.ICountable
interface. Pilatus does not return a value while scanning. Instead, it stores a file with the resulting image.
-
isCounting
()[source]¶ Returns true if the camera is acquiring an image, or false otherwise.
Returns: - `bool`
-
setFileName
(name)[source]¶ Sets the output image file name. The image will be saved with this name after the acquisition.
Parameters: - name : string
The name of image to save.
-
setFilePath
(path)[source]¶ Sets the output image file path. The image will be saved in this location after the acquisition.
Parameters: - name : string
The path of location to save the image.
-
setImageName
(name)[source]¶ Sets the output image file name. The image will be saved with this name after the acquisition.
Parameters: - name : string
The full pathname of the image.
-
setTriggerMode
(mode)[source]¶ Trigger mode
Parameters: - mode : int
0 : Internal 1 : Ext. Enable 2 : Ext. Trigger 3 : Mult. Trigger 4 : Alignment
-
startCount
()[source]¶ Starts acquiring an image. It will acquire for the duration set with
setCountTime()
. The resulting file will be stored in the file set withsetImageName()
.See:
setCountTime()
,setImageName()
Examples
>>> def acquire(pilatus, time, filename): ... pilatus.setCountTime(time) ... pilatus.setImageName(filename) ... pilatus.startCount() ... pilatus.wait() ... pilatus.stopCount() ...