Skip to content

Commit

Permalink
update He-C-Fe-group python script for new pynucastro
Browse files Browse the repository at this point in the history
we now need to remove duplicates before the RateCollection
  • Loading branch information
zingale committed Oct 21, 2023
1 parent b28cd4e commit a9898d5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions networks/He-C-Fe-group/He-C-Fe-group.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,25 @@
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:
for r in d:
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

Expand Down

0 comments on commit a9898d5

Please sign in to comment.