Skip to content

Commit

Permalink
Merge pull request pyne#837 from FlanFlanagan/data_source_fix
Browse files Browse the repository at this point in the history
putting in a temporary catch for missing ace files
  • Loading branch information
scopatz committed Apr 14, 2016
2 parents b2b0912 + 39e21f7 commit b0f7907
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 b0f7907

Please sign in to comment.