Commit 21278a92 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

NXWriter: dont write config if not existing

parent 01a02f88
......@@ -68,16 +68,15 @@ class NXProcessWriter(Writer):
nx_process['date'] = datetime.now().replace(microsecond=0).isoformat()
nx_process['sequence_index'] = np.int32(processing_index)
if config is None:
config = {}
export_dict_to_h5(
config,
self.fname,
'/'.join([nx_process.name, 'configuration']),
overwrite_data=True,
mode="a"
)
nx_process['configuration'].attrs['NX_class'] = "NXcollection"
if config is not None:
export_dict_to_h5(
config,
self.fname,
'/'.join([nx_process.name, 'configuration']),
overwrite_data=True,
mode="a"
)
nx_process['configuration'].attrs['NX_class'] = "NXcollection"
nx_data = nx_process.require_group('results')
nx_data.attrs['NX_class'] = "NXdata"
nx_data.attrs['signal'] = "data"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment