Skip to content

Commit

Permalink
simplify the method to get dc
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkjack123 committed Apr 10, 2019
1 parent 660b1bd commit 61c4573
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyne/alara.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,12 @@ def photon_source_hdf5_to_mesh(mesh, filename, tags, sub_voxel=False,
# creat a list of decay times (strings) in the source file
phtn_src_dc = []
with tb.open_file(filename) as h5f:
# import pdb; pdb.set_trace()
for row in h5f.root.data:
phtn_src_dc.append(row[2])
if row[2] not in phtn_src_dc:
phtn_src_dc.append(row[2])
else:
break
phtn_src_dc = list(set(phtn_src_dc))

# iterate through each requested nuclide/dectay time
Expand Down

0 comments on commit 61c4573

Please sign in to comment.