Skip to content

Commit 31662f3

Browse files
committed
Changed order of pop and inf file parsing to allow sanity checks. #41
1 parent 7601a0a commit 31662f3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

structure_threader/plotter/structplot.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,10 @@ def __init__(self, ouput_file_list, fmt, popfile=None, indfile=None):
363363
"""
364364
self.number_indv = None
365365

366-
# If a popfile has been provided, parse it and set the pops attribute
367-
if popfile:
368-
self._parse_popfile(popfile)
369-
370-
# If an indfile
371-
if indfile:
372-
self._parse_indfile(indfile)
373-
374366
# Parse each output file and add it to the kvals attribute
375367
for fpath in ouput_file_list:
376368

377-
if self.indv is None and self.pops == []:
369+
if not popfile and not indfile and self.indv is None:
378370
# Create PlotK object
379371
kobj = PlotK(fpath, self.fmt, get_indv=True)
380372
self.indv = kobj.indv
@@ -391,6 +383,14 @@ def __init__(self, ouput_file_list, fmt, popfile=None, indfile=None):
391383
if kobj.k > self.max_k:
392384
self.max_k = kobj.k
393385

386+
# If a popfile has been provided, parse it and set the pops attribute
387+
if popfile:
388+
self._parse_popfile(popfile)
389+
390+
# If an indfile
391+
if indfile:
392+
self._parse_indfile(indfile)
393+
394394
def __getattr__(self, item):
395395
"""
396396
Adds dot notation to get values of the kvals attribute. since the key

0 commit comments

Comments
 (0)