Skip to content

Commit dcdafab

Browse files
committed
add basic checks to PRV loader
now checks and warns if trace appears to be simulated or chopped
1 parent 0f44113 commit dcdafab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pypop/trace/prvtrace.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@
6060
class PRVTrace(Trace):
6161
def _gather_metadata(self):
6262

63+
if ".sim." in self._tracefile:
64+
warn(
65+
"Filename {} suggests this trace has already been idealised. This will "
66+
"likely cause the PyPOP analysis to fail!".format(self._tracefile)
67+
)
68+
69+
if ".chop" in self._tracefile:
70+
warn(
71+
"Filename {} suggests this trace has been chopped before analysis. In "
72+
"some cases this can cause Dimemas idealisation to fail. It is "
73+
"recommended to use the trace chopping support built into PyPOP (see "
74+
"the documentation for more details)".format(self._tracefile)
75+
)
76+
6377
try:
6478
with zipopen(self._tracefile, "rt") as fh:
6579
headerline = fh.readline().strip()

0 commit comments

Comments
 (0)