aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/stream-split30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/stream-split b/scripts/stream-split
new file mode 100755
index 00000000..739b341b
--- /dev/null
+++ b/scripts/stream-split
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+open(FH, $ARGV[0]);
+open(OFH_IND, "> ".$ARGV[1]);
+open(OFH_PEAKS, "> ".$ARGV[2]);
+
+my $line;
+my $mode = 0;
+
+while ( $line = <FH> ) {
+
+ if ( $line =~ /^Reflections\ from\ indexing/ ) {
+ $mode = 1;
+ }
+
+ if ( $line =~ /^Peaks\ from\ peak\ search/ ) {
+ $mode = 2;
+ }
+
+ if ( $mode == 1 ) {
+ printf(OFH_IND $line);
+ } elsif ( $mode == 2 ) {
+ printf(OFH_PEAKS $line);
+ } else {
+ printf($line);
+ }
+
+}