From 319dbad7371d833061002ed44d1be5fc81a4df95 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 19 Apr 2010 10:46:37 +0200 Subject: Add scripts/stream-split for separating peaks from indexing --- scripts/stream-split | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/stream-split 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 = ) { + + 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); + } + +} -- cgit v1.2.3