diff options
author | Thomas White <taw@physics.org> | 2022-08-22 15:47:53 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-08-22 15:47:53 +0200 |
commit | 1179bed2ebc892dc918aae09dae586c516d0e36e (patch) | |
tree | f9d583ca2d4bb4987dda7602dd7e49fa4b3e147f /libcrystfel/src | |
parent | 0046aebc2cd466fd4a7a3a01ddf82e04376de062 (diff) |
image_create_dp_bad_sat: Initialise saturation array to infinity
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 3593f52b..3448421e 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -764,6 +764,7 @@ int image_create_dp_bad_sat(struct image *image, for ( i=0; i<dtempl->n_panels; i++ ) { + int j; size_t nel = PANEL_WIDTH(&dtempl->panels[i]) * PANEL_HEIGHT(&dtempl->panels[i]); image->dp[i] = malloc(nel*sizeof(float)); @@ -785,6 +786,10 @@ int image_create_dp_bad_sat(struct image *image, return 1; } + for ( j=0; j<nel; j++ ) { + image->sat[i][j] = INFINITY; + } + } return 0; |