Skip to content

Commit

Permalink
Merge pull request pyne#1121 from zxkjack123/speed_up_r2s_step2_1
Browse files Browse the repository at this point in the history
Speed up r2s step2 1
  • Loading branch information
gonuke authored Apr 18, 2019
2 parents 660b1bd + 32cdb3a commit b1931ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions news/speed_up_r2s_step2_1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**Added:** None

**Changed:**

* Simplify the method to get the list of decay/cooling times

**Deprecated:** None

**Removed:** None

**Fixed:** None

**Security:** None
6 changes: 4 additions & 2 deletions pyne/alara.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ def photon_source_hdf5_to_mesh(mesh, filename, tags, sub_voxel=False,
phtn_src_dc = []
with tb.open_file(filename) as h5f:
for row in h5f.root.data:
phtn_src_dc.append(row[2])
phtn_src_dc = list(set(phtn_src_dc))
if row[2] not in phtn_src_dc:
phtn_src_dc.append(row[2])
else:
break

# iterate through each requested nuclide/dectay time
for cond in tags.keys():
Expand Down

0 comments on commit b1931ce

Please sign in to comment.