File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -406,8 +406,9 @@ def cross_section_h5_file_to_json_file(
406406 'Atomic symbol' : dict_of_reactions [0 ]["Atomic symbol" ],
407407 'Incident particle' : dict_of_reactions [0 ]["Incident particle" ],
408408 'Library' : dict_of_reactions [0 ]["Library" ],
409-
410409 }
410+ #TODO check if multiple temperatures are present
411+ temperature_found = dict_of_reactions [0 ]['Temperature(K)' ]
411412 for entry in dict_of_reactions :
412413 del entry ["uuid" ]
413414 del entry ["Proton number" ]
@@ -419,8 +420,7 @@ def cross_section_h5_file_to_json_file(
419420 del entry ["Incident particle" ]
420421 del entry ["Library" ]
421422
422- # could get temperature key from dict_of_reactions, instead getting from user args
423- dict_of_multiple_reactions ['Temperature(K)' ] = {temperature : dict_of_reactions },
423+ dict_of_multiple_reactions ['Temperature(K)' ] = {temperature_found : dict_of_reactions },
424424
425425 with open (output , "w" ) as fout :
426426 json .dump (dict_of_multiple_reactions , fout , indent = indent )
You can’t perform that action at this time.
0 commit comments