def save_scan(self, nxentry, scan): '''*internal*: save the data from each SPEC scan to its own NXentry group''' scan.interpret() # ensure interpretation is complete eznx.addAttributes(nxentry, default="data") eznx.write_dataset(nxentry, "title", str(scan)) eznx.write_dataset(nxentry, "scan_number", scan.scanNum) eznx.write_dataset(nxentry, "command", scan.scanCmd) for func in scan.header.h5writers.values(): # ask the header plugins to save their part func(nxentry, self, scan.header, nxclass=CONTAINER_CLASS) for func in scan.h5writers.values(): # ask the scan plugins to save their part func(nxentry, self, scan, nxclass=CONTAINER_CLASS)
def write_ds(self, group, label, data, **attr): '''*internal*: writes a dataset to the HDF5 file, records the SPEC name as an attribute''' clean_name = utils.clean_name(label) eznx.write_dataset(group, clean_name, data, spec_name=label, **attr)