{"action":"created","issue":{"url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/36","labels_url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/36/comments","events_url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/36/events","html_url":"https://github.com/NSLS-II/Bug-Reports/issues/36","id":111422449,"number":36,"title":"Databroker can't read Eiger images","user":{"login":"yugangzhang","id":10730521,"avatar_url":"https://avatars.githubusercontent.com/u/10730521?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangzhang","html_url":"https://github.com/yugangzhang","followers_url":"https://api.github.com/users/yugangzhang/followers","following_url":"https://api.github.com/users/yugangzhang/following{/other_user}","gists_url":"https://api.github.com/users/yugangzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangzhang/subscriptions","organizations_url":"https://api.github.com/users/yugangzhang/orgs","repos_url":"https://api.github.com/users/yugangzhang/repos","events_url":"https://api.github.com/users/yugangzhang/events{/privacy}","received_events_url":"https://api.github.com/users/yugangzhang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-14T15:25:09Z","updated_at":"2015-10-14T15:28:03Z","closed_at":null,"body":"We can't read Eiger images under 'Collection'\r\n\r\n```python\r\nIn [65]: hdr = db[-1]\r\n\r\nIn [66]: hdr\r\nOut[66]: \r\n{'descriptors': [{'data_keys': {'eiger_4M_cam_img_acquire_period': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}cam1:AcquirePeriod_RBV'},\r\n    'eiger_4M_cam_img_acquire_time': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}cam1:AcquireTime_RBV'},\r\n    'eiger_4M_cam_img_image_lightfield': {'dtype': 'array',\r\n     'external': 'FILESTORE:',\r\n     'shape': [2167, 2070],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}'},\r\n    'eiger_4M_cam_img_stats_total1': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}Stats1:Total_RBV'},\r\n    'eiger_4M_cam_img_stats_total2': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}Stats2:Total_RBV'},\r\n    'eiger_4M_cam_img_stats_total3': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}Stats3:Total_RBV'},\r\n    'eiger_4M_cam_img_stats_total4': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}Stats4:Total_RBV'},\r\n    'eiger_4M_cam_img_stats_total5': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}Stats5:Total_RBV'},\r\n    'eiger_4M_cam_imgsequenceid': {'dtype': 'number',\r\n     'shape': [],\r\n     'source': 'PV:XF:11IDB-BI{Det:Eig4M}cam1:SequenceId'}},\r\n   'run_start': '574bb68b-f493-4f45-bd6e-fabc66c6f894',\r\n   'time': 1444834144.1088412,\r\n   'uid': '4ae706a4-3355-4b30-a866-c8779b3e9d9a'}],\r\n 'start': {'beamline_id': 'CHX',\r\n  'config': {},\r\n  'group': 'chx',\r\n  'owner': 'xf11id',\r\n  'project': 'Undulator spectrum studies',\r\n  'sample': {},\r\n  'scan_args': {'delay': '0',\r\n   'detectors': \"[AreaDetectorFileStoreEiger(name='eiger_4M_cam_img', basename='XF:11IDB-BI{Det:Eig4M}', stats=range(1, 6), shutter=None, shutter_rb=None, shutter_val=None, file_path='/XF11ID/data/', ioc_file_path=None)]\",\r\n   'num': '1'},\r\n  'scan_id': 289,\r\n  'scan_type': 'Count',\r\n  'time': 1444834132.0575428,\r\n  'uid': '574bb68b-f493-4f45-bd6e-fabc66c6f894'},\r\n 'stop': {'exit_status': 'success',\r\n  'reason': '',\r\n  'run_start': '574bb68b-f493-4f45-bd6e-fabc66c6f894',\r\n  'time': 1444834144.1293712,\r\n  'uid': 'e39e559e-57e8-4883-9fb4-adb8d7742596'}}\r\n\r\nIn [67]: img = get_images( hdr, 'eiger_4M_cam_img_image_lightfield' )\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\n<ipython-input-67-a307ab930b8b> in <module>()\r\n----> 1 img = get_images( hdr, 'eiger_4M_cam_img_image_lightfield' )\r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/databroker-0.3.0-py3.4.egg/databroker/pims_readers.py in get_images(headers, name)\r\n     23             # do something\r\n     24     \"\"\"\r\n---> 25     return Images(headers, name)\r\n     26 \r\n     27 \r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/databroker-0.3.0-py3.4.egg/databroker/pims_readers.py in __init__(self, headers, name)\r\n     47         self._datum_uids = [event.data[name] for event in events]\r\n     48         self._len = len(self._datum_uids)\r\n---> 49         example_frame = retrieve(self._datum_uids[0])\r\n     50         self._dtype = example_frame.dtype\r\n     51         self._shape = example_frame.shape\r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/filestore/commands.py in inner(*args, **kwargs)\r\n     19         port = int(conf.connection_config['port'])\r\n     20         db_connect(database=database, host=host, port=port)\r\n---> 21         return func(*args, **kwargs)\r\n     22     return inner\r\n     23 \r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/filestore/commands.py in retrieve(eid)\r\n    136         The requested data as a numpy array\r\n    137     \"\"\"\r\n--> 138     return _get_data(eid)\r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/filestore/retrieve.py in get_data(eid, handle_registry)\r\n    261                         \"datum cache can hold.\")\r\n    262 \r\n--> 263     handler = get_spec_handler(datum['resource'], handle_registry)\r\n    264     return handler(**datum['datum_kwargs'])\r\n\r\n/opt/conda_envs/collection/lib/python3.4/site-packages/filestore/retrieve.py in get_spec_handler(resource, handle_registry)\r\n    204 \r\n    205     spec = resource['spec']\r\n--> 206     handler = handle_registry[spec]\r\n    207     key = (str(resource['_id']), handler.__name__)\r\n    208     if key in _HANDLER_CACHE:\r\n\r\nKeyError: 'AD_EIGER'\r\n\r\n```\r\n\r\nWe also don't have EigerImages functions in chxtools.pims_reader\r\n\r\n```python\r\nIn [69]: from chxtools.pims_readers import EigerImages\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-69-330a75e1c6f7> in <module>()\r\n----> 1 from chxtools.pims_readers import EigerImages\r\n\r\n/home/xf11id/shared/chxtools/chxtools/pims_readers/__init__.py in <module>()\r\n----> 1 from eiger import EigerImages\r\n      2 from edf import EDFImages\r\n\r\nImportError: cannot import name 'EigerImages'\r\n\r\nIn [70]: \r\n```\r\nWhat happed?\r\n"},"comment":{"url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/comments/148085543","html_url":"https://github.com/NSLS-II/Bug-Reports/issues/36#issuecomment-148085543","issue_url":"https://api.github.com/repos/NSLS-II/Bug-Reports/issues/36","id":148085543,"user":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T15:28:03Z","updated_at":"2015-10-14T15:28:03Z","body":"Because you have not registered the eiger handler.  Someplace in your other code there is something like `register_handler('AD_EIGER', ....)`.  You just need to run the same code in your collection environment."}}