From 61c4573237c3e8f63ce430ca417b8a7b036c30e8 Mon Sep 17 00:00:00 2001 From: zxkjack123 Date: Wed, 10 Apr 2019 11:13:59 -0500 Subject: [PATCH 1/3] simplify the method to get dc --- pyne/alara.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyne/alara.py b/pyne/alara.py index 07baee378f..22254b17cf 100644 --- a/pyne/alara.py +++ b/pyne/alara.py @@ -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 From df36e5d9fed7dad0514bbaa7593ed4fb5f14e9da Mon Sep 17 00:00:00 2001 From: zxkjack123 Date: Wed, 10 Apr 2019 11:22:12 -0500 Subject: [PATCH 2/3] clean up --- pyne/alara.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyne/alara.py b/pyne/alara.py index 22254b17cf..5b1677a7bd 100644 --- a/pyne/alara.py +++ b/pyne/alara.py @@ -233,13 +233,11 @@ 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: 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 for cond in tags.keys(): From 32cdb3a1e37fb268f4e4a50e7840aebd428de11b Mon Sep 17 00:00:00 2001 From: zxkjack123 Date: Wed, 10 Apr 2019 11:54:05 -0500 Subject: [PATCH 3/3] add news file --- news/speed_up_r2s_step2_1.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 news/speed_up_r2s_step2_1.rst diff --git a/news/speed_up_r2s_step2_1.rst b/news/speed_up_r2s_step2_1.rst new file mode 100644 index 0000000000..832c95580c --- /dev/null +++ b/news/speed_up_r2s_step2_1.rst @@ -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