aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-near-bragg20
-rwxr-xr-xscripts/check-peak-detection20
2 files changed, 32 insertions, 8 deletions
diff --git a/scripts/check-near-bragg b/scripts/check-near-bragg
index 4077c6e2..a651d896 100755
--- a/scripts/check-near-bragg
+++ b/scripts/check-near-bragg
@@ -3,6 +3,8 @@
use strict;
use File::Basename;
+my $skip = 0;
+
my $args = join(" ", splice(@ARGV, 1, scalar(@ARGV)-1));
if ( !($args eq "") ) {
printf("Extra arguments for hdfsee: %s\n", $args);
@@ -19,6 +21,8 @@ my $in_image = 0;
my $line;
my $filename;
my $event = "";
+my $n_seen = 0;
+
while ( $line = <FH> ) {
chomp $line;
@@ -59,10 +63,18 @@ while ( $line = <FH> ) {
$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; }
+
+ $n_seen++;
+ if ( $n_seen > $skip ) {
+
+ printf(STDERR "Viewing %s%s\n", $filename, $evr);
+ system("hdfsee ".$filename.$ev.
+ " --peak-overlay=list.tmp ".$args);
+ if ( $? != 0 ) { exit; }
+ } else {
+ printf(STDERR "Skipping %s%s\n", $filename, $evr);
+ }
+
unlink("list.tmp");
open(TMP, "> list.tmp");
$handled = 1;
diff --git a/scripts/check-peak-detection b/scripts/check-peak-detection
index 537e1698..9b3e3d6f 100755
--- a/scripts/check-peak-detection
+++ b/scripts/check-peak-detection
@@ -3,6 +3,8 @@
use strict;
use File::Basename;
+my $skip = 0;
+
my $only;
my $file;
my $start;
@@ -38,6 +40,8 @@ my $line;
my $filename;
my $event;
my $indexed;
+my $n_seen = 0;
+
while ( $line = <FH> ) {
chomp $line;
@@ -108,10 +112,18 @@ while ( $line = <FH> ) {
$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; }
+
+ $n_seen++;
+ if ( $n_seen > $skip ) {
+
+ printf(STDERR "Viewing %s%s\n", $filename, $evr);
+ system("hdfsee ".$filename.$ev.
+ " --peak-overlay=list.tmp ".$args);
+ if ( $? != 0 ) { exit; }
+ } else {
+ printf(STDERR "Skipping %s%s\n", $filename, $evr);
+ }
+
unlink("list.tmp");
open(TMP, "> list.tmp");
$in_image = 0;