-
Notifications
You must be signed in to change notification settings - Fork 12
Tips for controlling EIGER detector
keitaroyam edited this page Oct 31, 2017
·
7 revisions
EIGER 9M (and 16M) have function to use 4M ROI. To enable 4M ROI,
import eigerclient
e = eigerclient.DEigerClient(host=eiger_host)
e.setDetectorConfig("roi_mode", "4M")
The beam center coordinate is not automatically shifted. Need to subtract 511 (one panel plus gap) from beam center y (slow). To disable ROI mode, call e.setDetectorConfig("roi_mode", "disabled")
.
Reference: EIGER User Manual
We updated pixel_mask when hot pixels were accidentally made (by very intense X-ray).
import eigerclient
import numpy
from base64 import b64decode
e = eigerclient.DEigerClient(host=eiger_host)
tmp = e.detectorConfig("pixel_mask")
pm = numpy.fromstring(b64decode(tmp["value"]["data"]), dtype=tmp["value"]["type"]).reshape(tmp["value"]["shape"])
This pm
is pixel_mask which is equivalent to what is stored in master.h5:
import h5py
h = h5py.File("foo_master.h5", "r")
pm_in_h5 = h["/entry/instrument/detector/detectorSpecific/pixel_mask"][:]
print numpy.all(pm==pm_in_h5) # True
import eigerclient
from base64 import b64encode
e = eigerclient.DEigerClient(host=eiger_host)
pm = ... # Prepare somehow
new_conf = {
'__darray__': (1,0,0),
'type': pm.dtype.str,
'shape': pm.shape,
'filters': ['base64'],
'data': b64encode(pm.data) }
e.setDetectorConfig("pixel_mask", new_conf)
After this, pixel_mask is kept on EIGER system. It was kept after rebooting DCU. Probably firmware update will revert this.