aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-01-19 15:42:27 +0100
committerThomas White <taw@physics.org>2018-01-19 15:45:53 +0100
commitfeb53e52aa5ed0a8e479dae5d562ded30c85ac29 (patch)
treeee04fdcbd0b5be443b2c6e3569d65d0a914db255 /scripts
parentbea47f8e5be2c92fbdf5d1b1954a8556880c559b (diff)
scripts/truncate-stream: Fix missing crystal start marker
Affects chunks with multiple crystals. Previously, the crystal start marker for the second and subsequent crystals was missed.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/truncate-stream1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/truncate-stream b/scripts/truncate-stream
index 7de5c953..009a8aaf 100755
--- a/scripts/truncate-stream
+++ b/scripts/truncate-stream
@@ -58,6 +58,7 @@ def count_crystals(f, g, start_after, stop_after):
for line in chunk_so_far:
g.write(line)
chunk_so_far.clear()
+ chunk_so_far.append(fline)
if fline.find("End crystal") != -1:
n_crystals_seen += 1