aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-24 17:37:54 +0100
committerThomas White <taw@physics.org>2009-11-24 17:37:54 +0100
commit6062423d9a94433a228ae822fe2017e4ee103a21 (patch)
treedcb7ba7c6df4f21b933b99fefc5de635eebdaa56 /src
parent71a0524b4c3bb168358090baf8cfebe058f23463 (diff)
Comments
Diffstat (limited to 'src')
-rw-r--r--src/sfac.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sfac.c b/src/sfac.c
index c13ed3b8..7257bf01 100644
--- a/src/sfac.c
+++ b/src/sfac.c
@@ -116,7 +116,7 @@ static double complex get_f1f2(const char *n, double en)
}
-/* s = sin(theta)/lambda */
+/* s = sin(theta)/lambda in metres^-1*/
static double get_waas_kirf(const char *n, double s)
{
FILE *fh;
@@ -195,6 +195,8 @@ double complex get_sfac(const char *n, double s, double en)
double complex f1f2;
double fq, fq0;
+ /* Use the complex scattering factor from Henke, and add the
+ * falloff in the real part from Waas/Kirf */
f1f2 = get_f1f2(n, en);
fq = get_waas_kirf(n, s);
fq0 = get_waas_kirf(n, 0.0);
@@ -352,11 +354,11 @@ struct molecule *load_molecule()
spec = malloc(sizeof(struct mol_species));
memcpy(spec->species, el, 4);
- spec->x[0] = x*1.0e-10; /* Convert to nm */
+ spec->x[0] = x*1.0e-10; /* Convert to m */
spec->y[0] = y*1.0e-10;
spec->z[0] = z*1.0e-10;
spec->occ[0] = occ;
- spec->B[0] = B*1.0e-20; /* Convert to nm^2 */
+ spec->B[0] = B*1.0e-20; /* Convert to m^2 */
spec->n_atoms = 1;
mol->species[mol->n_species] = spec;