aboutsummaryrefslogtreecommitdiff
path: root/scripts/check-peak-detection
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-12-13 22:10:30 -0800
committerThomas White <taw@physics.org>2014-12-13 22:12:12 -0800
commit4f80ff8f01695276cc0d4cb628034f1b50d8e2d4 (patch)
tree048379daaf534acdd4da4cc752811741d0511e60 /scripts/check-peak-detection
parent3e8509622ee6ed0c54264a34b6c52116736013b1 (diff)
Update check-near-bragg and cheak-peak-detection for multi-event files
Diffstat (limited to 'scripts/check-peak-detection')
-rwxr-xr-xscripts/check-peak-detection19
1 files changed, 17 insertions, 2 deletions
diff --git a/scripts/check-peak-detection b/scripts/check-peak-detection
index 002aaeca..537e1698 100755
--- a/scripts/check-peak-detection
+++ b/scripts/check-peak-detection
@@ -36,6 +36,7 @@ open(TMP, "> list.tmp");
my $in_image = 0;
my $line;
my $filename;
+my $event;
my $indexed;
while ( $line = <FH> ) {
@@ -53,6 +54,10 @@ while ( $line = <FH> ) {
$filename = $1;
}
+ if ( $line =~ /^Event:\ (.+)$/ ) {
+ $event = $1;
+ }
+
if ( $line =~ /^indexed_by\ =\ (.*)$/ ) {
if ( $1 eq "none" ) {
$indexed = 0;
@@ -94,13 +99,23 @@ while ( $line = <FH> ) {
# Example of how to do "basename" and "prefix":
# $filename = "images-old/".basename($filename);
- printf(STDERR "Viewing %s\n", $filename);
- system("hdfsee ".$filename.
+ my $ev;
+ my $evr;
+ if ( $event eq "" ) {
+ $ev = "";
+ $evr = "";
+ } else {
+ $ev = " --event=".$event;
+ $evr = ", event ".$event;
+ }
+ printf(STDERR "Viewing %s%s\n", $filename, $evr);
+ system("hdfsee ".$filename.$ev.
" --peak-overlay=list.tmp ".$args);
if ( $? != 0 ) { exit; }
unlink("list.tmp");
open(TMP, "> list.tmp");
$in_image = 0;
+ $event = "";
}