aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-22 15:50:15 +0100
committerThomas White <taw@physics.org>2010-01-22 15:50:15 +0100
commitef9281fb30a07b8ee099ada3e1f7a0a10cbca5c0 (patch)
tree42cee1574cb21a2c67796d6fa715631d56e6fd1e /src/detector.c
parent59e333ee9e40ae0be0af08fe0eb739f1babf5771 (diff)
Remove 'xray_energy' to leave a single point of truth for wavelength
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/detector.c b/src/detector.c
index 9b39a6b9..2c313cdc 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -153,7 +153,7 @@ void record_image(struct image *image, int do_water, int do_poisson,
/* How many photons are scattered per electron? */
area = M_PI*pow(BEAM_RADIUS, 2.0);
- total_energy = FLUENCE * image->xray_energy;
+ total_energy = FLUENCE * ph_lambda_to_en(image->lambda);
energy_density = total_energy / area;
ph_per_e = (FLUENCE/area) * pow(THOMSON_LENGTH, 2.0);
STATUS("Fluence = %8.2e photons, "
@@ -183,7 +183,7 @@ void record_image(struct image *image, int do_water, int do_poisson,
/* Add intensity contribution from water */
water = water_intensity(image->qvecs[x + image->width*y],
- image->xray_energy,
+ ph_lambda_to_en(image->lambda),
BEAM_RADIUS, WATER_RADIUS);
intensity += water;