aboutsummaryrefslogtreecommitdiff
path: root/scripts/check-near-bragg
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-12-14 11:51:21 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:10 +0100
commit226073682c765f3ebc7423fd1024b26a03d2a84b (patch)
tree4341a07193b9aa926b61c2132afdbe87b029f6c9 /scripts/check-near-bragg
parent77c97f68f1fd487f9ae848a64b14a90c76792bdd (diff)
Update check-near-bragg to handle dumped peaks as well
Diffstat (limited to 'scripts/check-near-bragg')
-rwxr-xr-xscripts/check-near-bragg14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/check-near-bragg b/scripts/check-near-bragg
index 28347831..c7d747a1 100755
--- a/scripts/check-near-bragg
+++ b/scripts/check-near-bragg
@@ -1,6 +1,7 @@
#!/usr/bin/perl -w
use strict;
+use File::Basename;
open(FH, $ARGV[0]);
open(TMP, "> list.tmp");
@@ -18,13 +19,24 @@ while ( $line = <FH> ) {
$handled = 1;
}
+ if ( $line =~ /^\s*[0-9\-\.]+\s+[0-9\-\.]+\s+[0-9\-\.]+\s+[0-9\.\-]+/ ) {
+ printf(TMP "%s\n", $line);
+ $handled = 1;
+ }
+
if ( $line =~ /^Reflections\ from\ indexing\ in\ (.+)$/ ) {
$filename = $1;
$handled = 1;
}
- if ( $line =~ /^Peak statistics/ ) {
+ if ( $line =~ /^Peaks\ from\ peak search\ in\ (.+)$/ ) {
+ $filename = $1;
+ $handled = 1;
+ }
+
+ if ( $line =~ /^$/ ) {
close(TMP);
+ $filename = "images-old/".basename($filename);
system("hdfsee ".$filename." --peak-overlay=list.tmp --binning=1 --int-boost=10");
if ( $? != 0 ) { exit; }
unlink("list.tmp");