Fixed bug in replacing score strings for scatter-*n in statepoint.py

This commit is contained in:
Will Boyd 2014-11-28 12:28:43 -05:00
parent 96d5fb671d
commit 8c3789cb78

View file

@ -380,8 +380,12 @@ class StatePoint(object):
for j, score in enumerate(scores):
# If this is a scattering moment, insert the scattering order
if 'scatter-n' in score or 'scatter-yn' in score or 'scatter-pn' in score:
score = score.replace('n', str(scatt_order[j]))
if '-n' in score:
score = score.replace('-n', '-' + str(scatt_order[j]))
elif '-yn' in score:
score = score.replace('-pn', '-p' + str(scatt_order[j]))
elif '-pn' in score:
score = score.replace('-yn', '-y' + str(scatt_order[j]))
tally.add_score(score)