aboutsummaryrefslogtreecommitdiff
path: root/scripts/cif2hkl
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-07-30 20:32:55 -0700
committerThomas White <taw@bitwiz.org.uk>2012-07-30 20:42:51 -0700
commit0b262aa61f587b69fd46c95841342886580f4946 (patch)
tree995a2619022ac01e0f96611f47eb37adf195641d /scripts/cif2hkl
parent31f6c26cd344c01e0c329fa812cf78a7ef9dc700 (diff)
Update *2hkl scripts, add cif2hkl
Diffstat (limited to 'scripts/cif2hkl')
-rwxr-xr-xscripts/cif2hkl28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/cif2hkl b/scripts/cif2hkl
new file mode 100755
index 00000000..8d82726c
--- /dev/null
+++ b/scripts/cif2hkl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my $line;
+
+printf(" h k l I phase sigma(I) counts"
+ ." fs/px ss/px\n");
+
+while ( $line = <STDIN> ) {
+
+ if ( $line =~ /([\d\-]+)\s+([\d\-]+)\s+([\d\-]+)\so\s+[\d\.\-]+\s+[\d\.\-]+\s+([\d\.\-]+)\s+([\d\.\-]+)\s+$/ ) {
+
+ my $h = $1;
+ my $k = $2;
+ my $l = $3;
+ my $intensity = $4;
+ my $sigi = $5;
+
+ printf("%3i %3i %3i %10.2f %s %10.2f %7i %6.1f %6.1f\n",
+ $h, $k, $l, $intensity, " -", $sigi,
+ 1, 0.0, 0.0);
+
+ }
+
+}
+
+printf("End of reflections\n");