blob: d6caf72c2138ab6a3423f94092015689d7c693b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/perl -w
use strict;
my $nplots = 32;
my $sym = "6/mmm";
my $stream = $ARGV[0];
#system("~/crystfel/src/process_hkl -i ".$stream." -o test.hkl -y ".$sym);
open(FH, "test.hkl");
my $max = 0;
my $h;
my $k;
my $l;
my $line;
while ( $line = <FH> ) {
chomp $line;
if ( $line =~ /\s+(\d+)$/ ) {
my $n = $1;
if ( $n > $max ) {
$line =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+/;
$h = $1;
$k = $2;
$l = $3;
$max = $n;
}
}
}
printf("%i %i %i = %i\n", $h, $k, $l, $max);
exit 0;
|