aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-11-14 14:21:08 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:39 +0100
commit42e6b6387fc6e166bd493360ec89dda83ed9c2c6 (patch)
treeb1fcf1384ac4258b56c8ee2692dddc59e5239a32 /src/peaks.c
parent69632c5f4c08a255507a76f081c2fbb05c6a2184 (diff)
indexamajig: Pass the beam parameters properly
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/peaks.c b/src/peaks.c
index 3d90861b..f1a58d23 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -157,7 +157,15 @@ int integrate_peak(struct image *image, int cfs, int css,
int pixel_counts = 0;
double noise_mean = 0.0;
double noise_meansq = 0.0;
- const double aduph = image->beam->adu_per_photon;
+ struct beam_params *beam;
+ double aduph;
+
+ beam = image->beam;
+ if ( beam != NULL ) {
+ aduph = image->beam->adu_per_photon;
+ } else {
+ aduph = 1.0;
+ }
p = find_panel(image->det, cfs, css);
if ( p == NULL ) return 1;