storage = _HDF5_Storage(filename=filename, group=group)
storage.save(config=afm.config)
-def load_afm(filename=None, group=None):
+def load_config(filename=None, group=None):
if filename is None:
filename = DEFAULT_FILENAME
if group is None:
_LOG.info('loading AFM config from {} {}'.format(filename, group))
config = _AFMConfig(storage=_HDF5_Storage(filename=filename, group=group))
config.load()
+ return config
+
+def load_afm(filename=None, group=None):
+ config = load_config(filename=filename, group=group)
_LOG.debug(
'constructing AFM from configuration:\n{}'.format(config.dump()))
return AFM(config=config)