adds instruments metadata to h5 file

This commit is contained in:
2026-02-17 14:39:04 +01:00
parent fde2615107
commit de401b5474

View File

@@ -133,7 +133,6 @@ def deduplicate_instruments_from_layers(layers):
# "deposition_chamber": chambers,
# "rheed_system": rheeds,
# }
return instruments_used_dict
def make_nexus_schema_dictionary(substrate_object, layers):
'''
@@ -391,6 +390,17 @@ def build_nexus_file(pld_fabrication, output_path):
nx_post_annealing["duration"].attrs["units"] = post_ann_dict["duration"]["units"]
except TypeError as te:
raise TypeError(te)
# Instruments used section
nx_instruments = nx_pld_entry.create_group("instruments_used")
nx_instruments.attrs["NX_class"] = "NXinstrument"
instruments_dict = pld_fabrication["instruments_used"]
try:
nx_instruments.create_dataset("laser_system", data = instruments_dict["laser_system"])
nx_instruments.create_dataset("deposition_chamber", data = instruments_dict["deposition_chamber"])
nx_instruments.create_dataset("rheed_system", data = instruments_dict["rheed_system"])
except TypeError as te:
raise TypeError(te)
return
if __name__=="__main__":