It's hard to dig in to this script because reading from stdin blocks normal command line debugger use, but it appears that the script reads all roots that are present correctly and then incorrectly keeps looking for more roots. I haven't figured out exactly why that happens, but in the mean time just add a "break" statement after line 321.
e.g. old code:
...
while True:
ioscline = ioscline + 1
if ioscline >= max_osc_search:
raise Exception ("Failed to find oscillator strength after looking {0} lines.".format(ioscline))
...
and new code:
...
while True:
ioscline = ioscline + 1
if ioscline >= max_osc_search:
break
raise Exception ("Failed to find oscillator strength after looking {0} lines.".format(ioscline))
...
This is just a hack, not a proper fix, but it appears to let the script terminate normally. The resulting plotted data looks ok at first glance.
|