From 9ce505843376f26996fb818b4ab972073b445f94 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 24 Sep 2014 16:07:24 +0200 Subject: Remove beam radius and nphotons from struct beam_params --- libcrystfel/src/detector.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libcrystfel/src/detector.c') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 9972e2ba..4a202f2e 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -323,7 +323,7 @@ double get_tt(struct image *image, double fs, double ss, int *err) void record_image(struct image *image, int do_poisson, int background, - gsl_rng *rng) + gsl_rng *rng, double beam_radius, double nphotons) { int x, y; double total_energy, energy_density; @@ -338,14 +338,14 @@ void record_image(struct image *image, int do_poisson, int background, int n_nan2 = 0; /* How many photons are scattered per electron? */ - area = M_PI*pow(image->beam->beam_radius, 2.0); - total_energy = image->beam->fluence * ph_lambda_to_en(image->lambda); + area = M_PI*pow(beam_radius, 2.0); + total_energy = nphotons * ph_lambda_to_en(image->lambda); energy_density = total_energy / area; - ph_per_e = (image->beam->fluence /area) * pow(THOMSON_LENGTH, 2.0); + ph_per_e = (nphotons /area) * pow(THOMSON_LENGTH, 2.0); STATUS("Fluence = %8.2e photons, " "Energy density = %5.3f kJ/cm^2, " "Total energy = %5.3f microJ\n", - image->beam->fluence, energy_density/1e7, total_energy*1e6); + nphotons, energy_density/1e7, total_energy*1e6); for ( x=0; xwidth; x++ ) { for ( y=0; yheight; y++ ) { -- cgit v1.2.3