aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-22 16:09:22 +0100
committerThomas White <taw@physics.org>2010-01-22 16:09:22 +0100
commit8d1e6a113003b5446b7c27885535978ea85494b6 (patch)
treeaf3a9fa2aa56a773d0a1326ad9dacac811377864
parent75d30a3f2a7d8484575f5b6ba6ed07587dc19f1e (diff)
Move scattering factors to a common location
-rw-r--r--data/Makefile.am3
-rw-r--r--data/sfac/water-275K.dat38
-rw-r--r--src/sfac.c4
3 files changed, 43 insertions, 2 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index ed89f312..b4cebb2d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,2 +1,5 @@
hdfseedir = $(datadir)/hdfsee
hdfsee_DATA = displaywindow.ui
+
+crystfeldir = $(datadir)/crystfel
+crystfel_DATA = sfac/*
diff --git a/data/sfac/water-275K.dat b/data/sfac/water-275K.dat
new file mode 100644
index 00000000..64e646c8
--- /dev/null
+++ b/data/sfac/water-275K.dat
@@ -0,0 +1,38 @@
+0.00 0.00 0.00
+0.25 0.00 0.00
+0.50 0.00 0.00
+0.75 0.00 0.00
+1.00 0.00 0.00
+1.25 0.00 0.00
+1.50 0.00 0.00
+1.75 0.00 1.50
+2.00 0.00 0.80
+2.25 0.00 0.22
+2.50 0.15 0.17
+2.75 3.30 0.45
+3.00 1.10 1.30
+3.25 0.71 1.55
+3.50 0.75 1.25
+3.75 0.88 1.05
+4.00 1.02 1.02
+4.25 1.15 1.01
+4.50 1.20 0.99
+4.75 1.11 1.00
+5.00 1.00 1.00
+5.25 0.91 1.00
+5.50 0.84 0.99
+5.75 0.85 0.97
+6.00 0.93 0.95
+6.25 1.00 0.97
+6.50 1.07 0.99
+6.75 1.08 1.00
+7.00 1.06 1.04
+7.25 1.04 1.05
+7.50 1.00 1.03
+7.75 1.00 1.01
+8.00 1.00 1.00
+8.25 1.00 1.00
+8.50 1.00 1.00
+8.75 1.00 1.00
+9.00 1.00 1.00
+9.25 1.00 1.00
diff --git a/src/sfac.c b/src/sfac.c
index 597c6db4..661a8dfa 100644
--- a/src/sfac.c
+++ b/src/sfac.c
@@ -46,7 +46,7 @@ static double complex get_f1f2(const char *n, double en)
}
}
- snprintf(filename, 63, "scattering-factors/%s.nff", n);
+ snprintf(filename, 63, DATADIR"/crystfel/%s.nff", n);
fh = fopen(filename, "r");
if ( fh == NULL ) {
ERROR("Couldn't open file '%s'\n", filename);
@@ -170,7 +170,7 @@ static double get_waas_kirf(const char *n, double s)
if ( !found ) {
- fh = fopen("scattering-factors/f0_WaasKirf.dat", "r");
+ fh = fopen(DATADIR"/crystfel/f0_WaasKirf.dat", "r");
if ( fh == NULL ) {
ERROR("Couldn't open f0_WaasKirf.dat\n");
return 0.0;