Skip to content

Commit

Permalink
Added element information to the return dict.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed May 29, 2017
1 parent bc5cf86 commit e2e379c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bnlcrl/delta_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, **kwargs):
self.method = None # can be 'file', 'server', 'calculation'
self.output = None
self.elements = self.formula.split(',')
self.element = self.elements[-1]

if self.outfile:
self.save_to_file()
Expand Down Expand Up @@ -82,7 +83,6 @@ def __init__(self, **kwargs):
return_dict = {}
for k in d['cli_functions']['find_delta']['returns']:
return_dict[k] = getattr(self, k)
return_dict['element'] = self.elements[-1]
file_name = '{}.json'.format(self._output_file_name(self.elements, self.characteristic))
with open(file_name, 'w') as f:
json.dump(return_dict, f)
Expand Down
1 change: 1 addition & 0 deletions bnlcrl/package_data/json/defaults_delta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"characteristic",
"characteristic_value",
"closest_energy",
"element",
"method"
]
}
Expand Down

0 comments on commit e2e379c

Please sign in to comment.