Skip to content

Commit 7dde356

Browse files
committed
add basic checks to PRV loader
now checks and warns if trace appears to be simulated or chopped
1 parent 2c096b7 commit 7dde356

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
@@ -59,6 +59,20 @@
5959
class PRVTrace(Trace):
6060
def _gather_metadata(self):
6161

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

0 commit comments

Comments
 (0)