APS-USAXS / usaxs-bluesky-ended-2023

Bluesky instrument for USAXS
0 stars 0 forks source link

Something fishy with how image document is described in ophyd #550

Open prjemian opened 2 years ago

prjemian commented 2 years ago

While testing a new version of databroker with Dan Allan, we were trying to view WAXS data and found this resource/datum pair that has incorrect metadata:

TypeError: __call__() got an unexpected keyword argument 'HDF5_file_name'
In [18]: docs[2]
Out[18]: 
('resource',
 Resource({'path_semantics': 'posix',
 'resource_kwargs': {'frame_per_point': 0},
 'resource_path': 'mnt/usaxscontrol/USAXS_data/2022-02/02_06_Munoz/02_06_Munoz_waxs/Blank_0258.hdf',
 'root': '/',
 'run_start': 'f14a13d1-5daa-4432-9943-167d84a8eeff',
 'spec': 'AD_HDF5',
 'uid': '5c4ab658-ec56-4234-9c19-db4ddd556fec'}))

In [19]: docs[3][0]
Out[19]: 'datum_page'

In [20]: docs[3]
Out[20]: 
('datum_page',
 {'resource': '5c4ab658-ec56-4234-9c19-db4ddd556fec',
  'datum_id': ['5c4ab658-ec56-4234-9c19-db4ddd556fec/0'],
  'datum_kwargs': {'HDF5_file_name': ['/mnt/usaxscontrol/USAXS_data/2022-02/02_06_Munoz/02_06_Munoz_waxs/Blank_0258.hdf'],
   'point_number': [0]}})
HTTPStatusError: Server error '500 Internal Server Error' for url 'http://127.0.0.1:8000/array/block/9idc_usaxs/f14a13d1-5daa-4432-9943-167d84a8eeff/primary/data/data_vars/waxs_det_image/variable?block=0%2C0%2C0%2C0&expected_shape=1%2C1%2C195%2C981'
For more information check: https://httpstatuses.com/500

In [13]: c["9idc_usaxs"][-2]["primary"]
Out[13]: <BlueskyEventStream {'data', 'timestamps', 'config', 'config_timestamps'} stream_name='primary'>

In [14]: c["9idc_usaxs"][-2]
Out[14]: <BlueskyRun {'baseline', 'aps_current_monitor', 'primary'} scan_id=1031 uid='f14a13d1' 2022-02-07 07:57>