Closed jrmlhermitte closed 6 years ago
I currently tested this on old and new data and it works fine. It's good to merge.
from databroker import Broker
from eiger_io.fs_handler import EigerHandler
db = Broker.named("chx")
db.reg.register_handler("AD_EIGER2", EigerHandler)
db.reg.register_handler("AD_EIGER_SLICE", EigerHandler)
uid_manual = 'eab6ec58-864d-46af-8c29-67005de840b0'
uid_normal = '57ada663-a663-4cf6-8667-daaf7b7744e6'
imgs_manual = db[uid_manual].data('eiger1m_manual_image')
imgs_normal = list(db[uid_normal].data('eiger4m_single_image'))[0]
next(imgs_manual)
imgs_normal[0]
changed image_slice
naming to frame_num
. Also had to change CHX profiles here.
Adding a slice kwarg to Eiger Handler. backwards compatible. This is to satisfy a new mode we are trying in the acquisition from EIGER detectors.
The problem is that currently, for every point in a scan, two files are generated:
The first contains data but the second is overhead involving information on the detector. Thus to read a file, all a handler needed to know was the file prefix and sequence number (i.e. "830").
Now, a dscan saves all events in the same hdf5 linked file group (i.e. we only have one 'master' file per set of events now). This requires a new keyword argument, the slice number which I define to be
image_slice
effectively done here.I could have written two separate handlers but since there are almost no differences, I've combined them into one. I have however, added a new handler spec named
AD_EIGER_SLICE
just in case.