diff options
author | Thomas White <taw@physics.org> | 2010-04-30 12:32:17 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-04-30 12:32:17 +0200 |
commit | 77091ed4a02154a6ae263558562b662139d1efa2 (patch) | |
tree | 4219d129cd92bb2b80e710e0ceeed7166d1f38d7 | |
parent | a3edde6429caeb328aea50b06f4604a3515cfcbc (diff) |
double-hit: Say when hits are (supposedly) single or double
-rwxr-xr-x | scripts/double-hit | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/double-hit b/scripts/double-hit index 5d4489f9..04a3ab18 100755 --- a/scripts/double-hit +++ b/scripts/double-hit @@ -8,11 +8,13 @@ open(OFH, "> doublehit.dat"); my $line; my $filename; +my $full_filename; while ( $line = <FH> ) { if ( $line =~ /^Reflections\ from\ indexing\ in\ (.+)$/ ) { - $filename = basename($1); + $full_filename = $1; + $filename = basename($full_filename); } if ( $line =~ /^Peak\ statistics:\ (\d+)\ .*\ (\d+)\ .*\ (\d+)\ .*\ (\d+)\ / ) { @@ -32,7 +34,7 @@ while ( $line = <FH> ) { my $div; - if ( $foundclose > 0 ) { + if ( $found > 0 ) { $div = $found / $foundclose; } else { $div = 0.0; @@ -41,6 +43,13 @@ while ( $line = <FH> ) { printf(OFH "%s/%s/%s-%s:%s:%s %f\n", $year, $month, $day, $hour, $min, $sec, $div); + + if ( $div > 4.0 ) { + printf("Double hit: %s\n", $full_filename); + } + if ( $div == 1.0 ) { + printf("Single hit: %s\n", $full_filename); + } } } |