Skip to content

Commit

Permalink
putting in a temporary catch for missing ace files
Browse files Browse the repository at this point in the history
  • Loading branch information
Flan committed Mar 25, 2016
1 parent 6b9005f commit 39e21f7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pyne/xs/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,14 +934,15 @@ def _load_reaction(self, nuc, rx, temp=300.0):
ace_tables = self._rank_ace_tables(nuc, temp=temp)
lib = ntab = None
for atab in ace_tables:
if atab not in self.libs:
lib = self.libs[atab] = ace.Library(atab.abspath or atab.path)
lib.read(atab.name)
lib = self.libs[atab]
ntab = lib.tables[atab.name]
if mt in ntab.reactions or rx == totrx or rx == absrx:
break
lib = ntab = None
if os.path.isfile(atab.abspath or atab.path):
if atab not in self.libs:
lib = self.libs[atab] = ace.Library(atab.abspath or atab.path)
lib.read(atab.name)
lib = self.libs[atab]
ntab = lib.tables[atab.name]
if mt in ntab.reactions or rx == totrx or rx == absrx:
break
lib = ntab = None
if lib is None:
return None # no reaction available
E_g = self.src_group_struct
Expand Down Expand Up @@ -990,5 +991,6 @@ def load(self, temp=300.0):
"""
for atab in self.cross_sections.ace_tables:
lib = self.libs[atab] = ace.Library(atab.abspath or atab.path)
lib.read(atab.name)
if os.path.isfile(atab.abspath or atab.path):
lib = self.libs[atab] = ace.Library(atab.abspath or atab.path)
lib.read(atab.name)

0 comments on commit 39e21f7

Please sign in to comment.