aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indexamajig.c9
-rw-r--r--src/peaks.c10
2 files changed, 17 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 26ea158d..e78eff02 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -231,7 +231,7 @@ static void process_image(void *pp, int cookie)
int config_verbose = pargs->static_args.config_verbose;
int config_polar = pargs->static_args.config_polar;
IndexingMethod *indm = pargs->static_args.indm;
- const struct beam_params *beam = pargs->static_args.beam;
+ struct beam_params *beam = pargs->static_args.beam;
image.features = NULL;
image.data = NULL;
@@ -241,6 +241,13 @@ static void process_image(void *pp, int cookie)
image.filename = filename;
image.det = copy_geom(pargs->static_args.det);
image.copyme = pargs->static_args.copyme;
+ image.beam = beam;
+
+ if ( beam == NULL ) {
+ ERROR("Warning: no beam parameters file.\n");
+ ERROR("I'm going to assume 1 ADU per photon, which is almost");
+ ERROR(" certainly wrong. Peak sigmas will be incorrect.\n");
+ }
pargs->indexable = 0;
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;