diff options
author | Thomas White <taw@physics.org> | 2011-03-15 10:41:35 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:20 +0100 |
commit | be49b97c792edc33d908965823f73f33b830d557 (patch) | |
tree | 50a3a1eea924b6347e92ec46c6d67f2ba1c22787 /scripts/check-near-bragg | |
parent | 0f1a16a196ffed32eab9ede885de6d73928c718f (diff) |
More work on new stream format
Diffstat (limited to 'scripts/check-near-bragg')
-rwxr-xr-x | scripts/check-near-bragg | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/scripts/check-near-bragg b/scripts/check-near-bragg index 6c46fde6..17141fc4 100755 --- a/scripts/check-near-bragg +++ b/scripts/check-near-bragg @@ -14,36 +14,37 @@ while ( $line = <FH> ) { chomp $line; my $handled = 0; - if ( $line =~ /^\s*[0-9\-]+\s+[0-9\-]+\s+[0-9\-]+\s+[0-9\.\-]+/ ) { + if ( $in_image ) { printf(TMP "%s\n", $line); $handled = 1; } - if ( $line =~ /^\s*[0-9\-\.]+\s+[0-9\-\.]+\s+[0-9\-\.]+\s+[0-9\.\-]+/ ) { - printf(TMP "%s\n", $line); + if ( $line =~ /^Reflections\ measured\ after\ indexing$/ ) { + $in_image = 1; $handled = 1; } - if ( $line =~ /^Reflections\ from\ indexing\ in\ (.+)$/ ) { + if ( $line =~ /^Image\ filename:\ (.+)$/ ) { $filename = $1; $handled = 1; } - if ( $line =~ /^Peaks\ from\ peak search\ in\ (.+)$/ ) { - $filename = $1; - $handled = 1; - } + if ( $line =~ /^End\ of\ reflections$/ ) { - if ( $line =~ /^$/ ) { close(TMP); - #$filename = "images-old/".basename($filename); + + # Example of how to do "basename" and "prefix": + # $filename = "images-old/".basename($filename); + printf(STDERR "Viewing %s\n", $filename); system("hdfsee ".$filename. - " --peak-overlay=list.tmp --binning=1 --int-boost=10"); + " --peak-overlay=list.tmp --binning=2 --int-boost=10"); if ( $? != 0 ) { exit; } unlink("list.tmp"); open(TMP, "> list.tmp"); $handled = 1; + $in_image = 0; + } if ( !$handled ) { |