aboutsummaryrefslogtreecommitdiff
path: root/scripts/indexing-rate
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-30 17:28:54 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:23 +0100
commit0636814cc2c360fd9f37a1f7fe3e2be04cee8377 (patch)
tree1c42e92d3b8febd15e0a4bf6801bcc4be29163a0 /scripts/indexing-rate
parente0ec9d63f7747b47ab516c701fd55ffe977031a7 (diff)
Clean up old, useless and broken scripts
Diffstat (limited to 'scripts/indexing-rate')
-rwxr-xr-xscripts/indexing-rate93
1 files changed, 0 insertions, 93 deletions
diff --git a/scripts/indexing-rate b/scripts/indexing-rate
deleted file mode 100755
index 6dc61f36..00000000
--- a/scripts/indexing-rate
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use File::Basename;
-
-open(FH, $ARGV[0]);
-open(HITRATE, "> hitrate.dat");
-
-my $line;
-my $year;
-my $month;
-my $day;
-my $hour;
-my $min = -1;
-my $sec = -1;
-my $nh = 0;
-
-while ( $line = <FH> ) {
-
- chomp($line);
-
- unless ( $line =~ /^Reflections\ from\ indexing\ in\ (.+)$/ ) {
- next;
- }
-
- my $filename = basename($1);
-
- if ( $filename ) {
-
- unless ( $filename =~
- /LCLS_(\d+)_([A-Za-z]+)(\d+)_r\d\d\d\d_(\d\d)(\d\d)(\d\d)_/ ) {
- printf(STDERR "Wrong filename format '%s'!\n",
- $filename);
- exit(1);
- }
-
- my $new_year = $1;
- my $new_month = $2;
- my $new_day = $3;
- my $new_hour = $4;
- my $new_min = $5;
- my $new_sec = $6;
-
- if ( $new_min != $min ) {
-
- # Not the first time
- if ( $sec != -1 ) {
- printf(HITRATE "%s/%s/%s-%s:%s:%s %i\n",
- $year, $month, $day,
- $hour, $min, $sec, $nh);
- }
-
- $year = $new_year;
- $month = $new_month;
- $day = $new_day;
- $hour = $new_hour;
- $min = $new_min;
- $sec = $new_sec;
- $nh = 0;
-
- } else {
-
- $nh++;
-
- }
-
- }
-
-}
-
-close(FH);
-close(HITRATE);
-
-#system("head -n 67 hitrate.dat > hitrate2.dat");
-system("tail -n 105 hitrate.dat > hitrate2.dat");
-
-open(GP, "| gnuplot");
-
-print(GP "set term postscript enhanced font \"Helvetica,20\"\n");
-print(GP "set output \"hitrate.ps\"\n");
-print(GP "set title \"Hit rate\"\n");
-print(GP "set xtics nomirror rotate by -60\n");
-print(GP "set xdata time\n");
-print(GP "set timefmt \"%Y/%b/%d-%H:%M:%S\"\n");
-print(GP "set format x \"%d/%b %H:%M\"\n");
-print(GP "set rmargin 6\n");
-print(GP "unset key\n");
-print(GP "plot [] [] \"hitrate2.dat\" u 1:2 w histeps lw 3 lc 3\n");
-close(GP);
-
-system("ps2pdf hitrate.ps");
-#unlink("hitrate.dat");
-unlink("hitrate.ps");