aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-12-18 15:40:33 +0100
committerThomas White <taw@physics.org>2015-12-18 15:40:33 +0100
commit120fca2d9a7abd79e41ef5051bd22efedcb2d493 (patch)
treec39c1f530c2b0a7d8f0b3113e78a396028421c7e
parent693aae4d2219632d15174fe4c4f9d0526d6166c4 (diff)
Saturation map fixes
-rw-r--r--libcrystfel/src/hdf5-file.c2
-rw-r--r--src/process_image.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index 09a34c31..a9518add 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -1171,6 +1171,8 @@ static int unpack_panels(struct image *image, struct detector *det,
if ( sat != NULL ) {
image->sat[pi][fs+p->w*ss] = sat[idx];
+ } else {
+ image->sat[pi][fs+p->w*ss] = INFINITY;
}
if ( p->no_index ) bad = 1;
diff --git a/src/process_image.c b/src/process_image.c
index 4fd19176..5d4212e2 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -337,9 +337,11 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
for ( i=0; i<image.det->n_panels; i++ ) {
free(image.dp[i]);
free(image.bad[i]);
+ free(image.sat[i]);
}
free(image.dp);
free(image.bad);
+ free(image.sat);
image_feature_list_free(image.features);
free_detector_geometry(image.det);