aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-01-05 16:39:43 +0100
committerThomas White <taw@physics.org>2024-01-05 16:39:43 +0100
commitcc2717022fca0fd6b24b1dba3aaa5173672a3223 (patch)
treed328fe9f0474e9dacbffffe7cdbe04df578b919f /scripts
parent73992281c975a1a631d2efe7b9b04fccb5459751 (diff)
get_hkl: Read MTZ files
There are still some rough edges, e.g. it only works with a simple I/SIGI column (not I+/I-), and can't yet interpret the symmetry information in the file. However, it's still better than the old mtz2hkl script. Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/7
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mtz2hkl44
1 files changed, 7 insertions, 37 deletions
diff --git a/scripts/mtz2hkl b/scripts/mtz2hkl
index e1c98251..5a7409c9 100755
--- a/scripts/mtz2hkl
+++ b/scripts/mtz2hkl
@@ -1,39 +1,9 @@
#!/bin/sh
-mtz2various hklin $1 hklout $2.temp <<EOF
-LABIN H=H K=K L=L I=IMEAN SIGI=SIGIMEAN
-OUTPUT USER '(3I4,2F15.1)'
-EOF
-
-perl < $2.temp > $2 << WIBBLE
-use strict;
-
-my \$line;
-open(FILE, "$2.temp");
-
-printf("CrystFEL reflection list version 2.0\n");
-printf("Symmetry: 1\n");
-printf(" h k l I phase sigma(I) nmeas\n");
-
-while ( \$line = <FILE> ) {
-
- if ( \$line =~ /^\s*([\d\-]+)\s+([\d\-]+)\s+([\d\-]+)\s+([\d\-\.]+)\s+([\d\-\.]+)/ ) {
-
- my \$h = \$1;
- my \$k = \$2;
- my \$l = \$3;
- my \$intensity = \$4;
- my \$sigi = \$5;
-
- printf("%4i %4i %4i %10.2f %s %10.2f %7i\n",
- \$h, \$k, \$l, \$intensity, " -", \$sigi, 1);
-
- } else {
- printf(STDERR "Couldn't understand line '%s'\n", \$line);
- }
-
-}
-close(FILE);
-printf("End of reflections\n");
-WIBBLE
-exit
+echo -------------------------------------------------------------
+echo
+echo In this CrystFEL version, MTZ import is now done via get_hkl:
+echo get_hkl -i file.mtz -o out.hkl
+echo
+echo -------------------------------------------------------------
+exit 1