aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-23 11:38:29 +0200
committerThomas White <taw@physics.org>2021-04-23 14:57:24 +0200
commit74df84c2471747437e6703d46d67ced28d9d90c9 (patch)
tree2f976f3a37d5cad4e87b5cfd9ccbaf283081f898 /scripts
parent2f4f6ad97467a62ed8bf5cb44040548b89493c0b (diff)
Improve documentation about reflection data export
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-mtz47
-rwxr-xr-xscripts/create-xscale61
2 files changed, 19 insertions, 89 deletions
diff --git a/scripts/create-mtz b/scripts/create-mtz
index add9f093..4f10f88f 100755
--- a/scripts/create-mtz
+++ b/scripts/create-mtz
@@ -1,42 +1,11 @@
#!/bin/sh
-# When you've edited the relevant parameters, delete this comment and the following two lines
-echo "You need to edit this script first, to set the space group and cell parameters."
+echo -------------------------------------------------------------
+echo
+echo In this CrystFEL version, MTZ export is now done via get_hkl:
+echo get_hkl -i file.hkl -p my.cell -o out.mtz --output-format=mtz
+echo
+echo Alternatively, use the Export Data function of the CrystFEL GUI
+echo
+echo -------------------------------------------------------------
exit 1
-
-OUTFILE=`echo $1 | sed -e 's/\.hkl$/.mtz/'`
-
-echo " Input: $1"
-echo "Output: $OUTFILE"
-if [ -e $OUTFILE ]; then
- echo " The output file already exists:"
- echo " " $OUTFILE
- echo " To confirm that you want to continue, which will DESTROY the"
- echo " current contents of this file, type 'y' and press enter."
- read conf
- if [ $conf != y ]; then
- echo "Not confirmed."
- exit 1
- else
- echo "Proceeding"
- fi
-fi
-
-sed -n '/End\ of\ reflections/q;p' $1 > create-mtz.temp.hkl
-
-echo "Running 'f2mtz'..."
-f2mtz HKLIN create-mtz.temp.hkl HKLOUT $OUTFILE > out.html << EOF
-TITLE Reflections from CrystFEL
-NAME PROJECT wibble CRYSTAL wibble DATASET wibble
-CELL 100 100 100 90 90 90
-SYMM P1
-SKIP 3
-LABOUT H K L IMEAN SIGIMEAN
-CTYPE H H H J Q
-FORMAT '(3(F4.0,1X),F10.2,10X,F10.2)'
-EOF
-
-if [ $? -ne 0 ]; then echo "Failed."; exit; fi
-
-rm -f create-mtz.temp.hkl
-echo "Done."
diff --git a/scripts/create-xscale b/scripts/create-xscale
index 6d9def4a..b0e8aef1 100755
--- a/scripts/create-xscale
+++ b/scripts/create-xscale
@@ -1,50 +1,11 @@
-#!/usr/bin/perl -w
-
-use strict;
-
-# When you've edited the relevant parameters, delete this comment and the
-# following two lines
-printf("You need to edit this script first, to set the space group and ".
- "cell parameters.\n");
-exit(1);
-
-open(FH, $ARGV[0]);
-
-printf("!FORMAT=XDS_ASCII MERGE=TRUE FRIEDEL'S_LAW=TRUE\n");
-printf("!SPACE_GROUP_NUMBER=182\n");
-printf("!UNIT_CELL_CONSTANTS= 281.00 281.00 165.00 90.000 90.000 120.000\n");
-printf("!NUMBER_OF_ITEMS_IN_EACH_DATA_RECORD=5\n");
-printf("!X-RAY_WAVELENGTH= -1.0\n");
-printf("!ITEM_H=1\n");
-printf("!ITEM_K=2\n");
-printf("!ITEM_L=3\n");
-printf("!ITEM_IOBS=4\n");
-printf("!ITEM_SIGMA(IOBS)=5\n");
-printf("!END_OF_HEADER\n");
-
-my $line;
-while ( $line = <FH> ) {
-
- chomp($line);
-
- if ( $line =~ /^\s+([0-9\-]+)\s+([0-9\-]+)\s+([0-9\-]+)\s+([0-9\.\-]+)\s+([\-]+)\s+([0-9\.\-]+)/ ) {
-
- my $h = $1;
- my $k = $2;
- my $l = $3;
- my $int = $4;
- my $sig = $6; # Yes, it's meant to be $6 not $5 ($5 is phase)
-
- printf("%6i %6i %5i %9.2f %9.2f\n", $h, $k, $l, $int, $sig);
-
- } else {
-
- printf(STDERR "Unrecognised: '%s'\n", $line);
-
- }
-
-}
-
-printf("!END_OF_DATA");
-
-close(FH);
+#!/bin/sh
+
+echo -------------------------------------------------------------
+echo
+echo In this CrystFEL version, XDS export is now done via get_hkl:
+echo get_hkl -i file.hkl -p my.cell -o out.hkl --output-format=xds
+echo
+echo Alternatively, use the Export Data function of the CrystFEL GUI
+echo
+echo -------------------------------------------------------------
+exit 1