[writer] allow missing data info when no data expected
Bug reported at ID10:
EH1_EXP [1]: autof_eh1.dscan(xgV,-1,1,20,.1,mpx_si_51.image,save=True)
DEBUG 2020-06-15 15:33:42 nexus_writer_service.subscribers.session_writer: [eh1_exp-2 (RUNNING)] [46_ascan-2 (ON)] no data to be saved for node 'mpx_si_51:image'
INFO 2020-06-15 15:33:42 nexus_writer_service.subscribers.session_writer: [eh1_exp-2 (RUNNING)] [46_ascan-2 (ON)] Link external data (VDS or raw)
ERROR 2020-06-15 15:33:42 nexus_writer_service.subscribers.session_writer: [eh1_exp-2 (RUNNING)] [46_ascan-2 (FAULT)] 'mpx_si_51:image' not initialized
This image itself is not expected to be saved but the detector metadata (mode, flip, ...) needs to be saved, which is what the writer tries to do but fails because:
The writer creates a proxy for each data channel based on node
and node.info
to provide an API for adding data and metadata. This proxy is not initialized (see error message) when minimal info is missing from node.info
. For example dtype is None
or not all(shape)
. However when no data is expected, we can safely make a proxy in those cases.