Skip to content

Commit

Permalink
Fix for change in tempo.lis. Should be backwards compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottransom committed Aug 28, 2017
1 parent 8ef28dc commit cc34399
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bin/pyplotres.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ def __init__(self, freqbands):
tempolisfile = open("tempo.lis")
intimfn, inparfn, outparfn = None, None, None
for line in tempolisfile:
match = inputfiles_re.search(line)
if match:
intimfn = match.group(1).strip()
inparfn = match.group(2).strip()
else:
match = outputfile_re.search(line)
if match:
outparfn = "%s.par" % match.group(1).strip()
if line[:15]=="Input data from":
sline = line.split()
intimfn = sline[3][:-1] # strip the comma
intimbase = os.path.splitext(intimfn)[0]
inparfn = intimbase+".par" if sline[6]=='def' else sline[6]
if inparfn[-1]==".": inparfn = inparfn[:-1]
elif line[:15]=="Assumed paramet":
outparfn = line.split()[-1]+".par"
if (intimfn != None) and (inparfn != None) and (outparfn != None):
# Found what we're looking for no need to continue parsing the file
break
Expand Down

0 comments on commit cc34399

Please sign in to comment.