From a9898d51708e3afee399cabe2f984da076102f6f Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sat, 21 Oct 2023 12:28:15 -0400 Subject: [PATCH] update He-C-Fe-group python script for new pynucastro we now need to remove duplicates before the RateCollection --- networks/He-C-Fe-group/He-C-Fe-group.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/networks/He-C-Fe-group/He-C-Fe-group.py b/networks/He-C-Fe-group/He-C-Fe-group.py index e4429b1d1a..dfa374d31f 100644 --- a/networks/He-C-Fe-group/He-C-Fe-group.py +++ b/networks/He-C-Fe-group/He-C-Fe-group.py @@ -95,15 +95,10 @@ d = pyna.DerivedRate(rate=fr, compute_Q=False, use_pf=True) all_lib.add_rate(d) -# combine all three libraries into a single network - -net = pyna.AmrexAstroCxxNetwork(libraries=[all_lib], - symmetric_screening=False) - # we will have duplicate rates -- we want to remove any ReacLib rates # that we have tabular rates for -dupes = net.find_duplicate_links() +dupes = all_lib.find_duplicate_links() rates_to_remove = [] for d in dupes: @@ -111,7 +106,14 @@ if isinstance(r, ReacLibRate): rates_to_remove.append(r) -net.remove_rates(rates_to_remove) +for r in rates_to_remove: + all_lib.remove_rate(r) + +# combine all three libraries into a single network + +net = pyna.AmrexAstroCxxNetwork(libraries=[all_lib], + symmetric_screening=False) + # now we approximate some (alpha, p)(p, gamma) links