Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scottransom/presto
Browse files Browse the repository at this point in the history
  • Loading branch information
scottransom committed Aug 29, 2017
2 parents 23b9067 + cc34399 commit 56ebe9a
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 56ebe9a

Please sign in to comment.