From 94daaeb94aa78ec7b1fb4badb4475161b7532473 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 20 Nov 2009 19:56:44 +0100 Subject: Tidy up Doesn't really change anything.. --- src/detector.c | 2 +- src/diffraction.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/detector.c b/src/detector.c index 41019551..ef2be5a8 100644 --- a/src/detector.c +++ b/src/detector.c @@ -147,7 +147,7 @@ void record_image(struct image *image) /* Solid angle subtended by a single pixel at the centre of the CCD */ sa_per_pixel = pow(1.0/image->resolution, 2.0) / image->camera_len; - printf("Solid angle of pixel (at centre of CCD) = %e sr\n", + printf("Solid angle of one pixel (at centre of CCD) = %e sr\n", sa_per_pixel); image->hdr = malloc(image->width * image->height * sizeof(double)); diff --git a/src/diffraction.c b/src/diffraction.c index ce4e47ee..3d4fa6ea 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -130,19 +130,19 @@ static double complex water_factor(struct threevec q, double en) double s; double molecules_per_m3; double molecules_per_m; - const double rc = 0.5e-6; /* Radius of cylinder */ - const double rb = 1.5e-6; /* Radius of beam */ + const double rc = 0.5e-6; /* Radius of cylinder (m) */ + const double rb = 1.5e-6; /* Radius of beam (m) */ /* Density of water molecules */ molecules_per_m3 = WATER_DENSITY * (AVOGADRO / WATER_MOLAR_MASS); - /* Number of water molecules per slice */ + /* Number of water molecules per slice per metre of thickness */ molecules_per_m = (2*rb*2*rc) * molecules_per_m3 / N_WATER_SLICES; /* s = sin(theta)/lambda = 1/2d = (1/d)/2.0 */ s = modulus(q.u, q.v, q.w) / 2.0; - for ( x=-rc; x