aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-08-18 14:20:16 +0200
committerThomas White <taw@physics.org>2022-08-18 15:57:46 +0200
commiteaf9e6250654e65daabbe98b6b4d5b5f8cd6924f (patch)
treeecaa9a88d1bfe1b03d36961d58f26f1dc2ab7c1d /libcrystfel/src/stream.c
parente8847558c3831e309d0325382589f34b273e96c8 (diff)
Restructure image data array creation
This adds a central procedure (image_create_dp_bad_sat) to create all the arrays. Then it's up to the loading procedure to put the values into the arrays. This also makes the loading procedures responsible for marking NaN/inf pixels in the bad pixel map. This avoids an additional sweep through the image data, and makes it possible to skip the NaN/inf check altogether if the image data comes, as it often does, in format which can't represent NaN/inf anyway. Finally, it removes quite a lot of duplicated code.
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 67297e49..708e681c 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -900,8 +900,8 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf)
image_free(image);
return NULL;
}
+ image_create_dp_bad_sat(image, st->dtempl_read);
image_set_zero_data(image, st->dtempl_read);
- image_set_zero_mask(image, st->dtempl_read);
}
image->spectrum = spectrum_generate_gaussian(image->lambda,
image->bw);