aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-11 11:28:50 +0200
committerThomas White <taw@physics.org>2018-05-11 11:28:50 +0200
commit9180b2820c83550d4faedf84b93fba2c75c55891 (patch)
tree90ac4d120b9e10b2a66969d0d9eb0a97f8bcf0b7
parent1f0987de8de5a1594623ab5d9fa24f1afe74dc93 (diff)
Much better way of stripping the audit information out of hkl files
-rwxr-xr-xscripts/create-mtz5
-rwxr-xr-xtests/partialator_merge_check_15
-rwxr-xr-xtests/partialator_merge_check_25
-rwxr-xr-xtests/partialator_merge_check_35
4 files changed, 7 insertions, 13 deletions
diff --git a/scripts/create-mtz b/scripts/create-mtz
index 62d94405..add9f093 100755
--- a/scripts/create-mtz
+++ b/scripts/create-mtz
@@ -22,10 +22,7 @@ if [ -e $OUTFILE ]; then
fi
fi
-ex -c '/End of reflections/
-.,$d
-w create-mtz.temp.hkl
-q!' $1
+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
diff --git a/tests/partialator_merge_check_1 b/tests/partialator_merge_check_1
index d39c2009..3c9d1661 100755
--- a/tests/partialator_merge_check_1
+++ b/tests/partialator_merge_check_1
@@ -46,9 +46,8 @@ src/partialator -i partialator_merge_check_1.stream \
-o partialator_merge_check_1.hkl \
--model=unity --iterations=0 --no-scale --no-polarisation
-ex -c '/End of reflections/
-.,$d
-x' partialator_merge_check_1.hkl
+sed -n '/End of reflections/q;p' partialator_merge_check_1.hkl > temp.hkl
+mv temp.hkl partialator_merge_check_1.hkl
diff partialator_merge_check_1.hkl partialator_merge_check_1_ans.hkl
if [ $? -ne 0 ]; then
exit 1
diff --git a/tests/partialator_merge_check_2 b/tests/partialator_merge_check_2
index 104f9fc4..9e7f51b3 100755
--- a/tests/partialator_merge_check_2
+++ b/tests/partialator_merge_check_2
@@ -51,9 +51,8 @@ src/partialator -i partialator_merge_check_2.stream \
--model=unity --iterations=1 --no-polarisation \
--no-free
-ex -c '/End of reflections/
-.,$d
-x' partialator_merge_check_2.hkl
+sed -n '/End of reflections/q;p' partialator_merge_check_2.hkl > temp.hkl
+mv temp.hkl partialator_merge_check_2.hkl
diff partialator_merge_check_2.hkl partialator_merge_check_2_ans.hkl
if [ $? -ne 0 ]; then
exit 1
diff --git a/tests/partialator_merge_check_3 b/tests/partialator_merge_check_3
index 08f9f481..5370472d 100755
--- a/tests/partialator_merge_check_3
+++ b/tests/partialator_merge_check_3
@@ -53,9 +53,8 @@ src/partialator -i partialator_merge_check_3.stream \
--model=unity --iterations=1 -y 4 --no-polarisation \
--no-free
-ex -c '/End of reflections/
-.,$d
-x' partialator_merge_check_3.hkl
+sed -n '/End\ of\ reflections/q;p' partialator_merge_check_3.hkl > temp.hkl
+mv temp.hkl partialator_merge_check_3.hkl
diff partialator_merge_check_3.hkl partialator_merge_check_3_ans.hkl
if [ $? -ne 0 ]; then
exit 1