Closed joelvbernier closed 3 years ago
I've fixed this in the instrument-package branch and pushed it up to my fork.
In the process, I discovered what appears to be a bug in the config.init() method when opening a file with multiple yaml documents. Instead of merging each new document with the previous merged document, it seems to merge the each new document with the original. Here is the code snippet. The merge should be with res[-1]
, not with res[0]
.
with open_file(file_name) as f:
res = []
for cfg in yaml.load_all(f, Loader=yaml.SafeLoader):
try:
# take the previous config section and update with values
# from the current one
res.append(utils.merge_dicts(res[0], cfg))
except IndexError:
# this is the first config section
res.append(cfg)
closed by PR #148 .
I'd like to add a hook in the materials block of the hedm config to specify (override) the
planeData.tThWidth
attribute on the specified object. Default value in the config should benull
, which would do nothing (i.e. just use what is specified in the saved material file).