aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-04-02 15:55:51 +0200
committerThomas White <taw@physics.org>2019-04-03 15:53:07 +0200
commit0a1a129583fdd191045df501d22a0342f612e548 (patch)
tree30ae20f574ca091c14baa8d45e3b51ddfdf36152 /libcrystfel/src/image.c
parente64e2ec6879410dc90c5d87f58268dd3eb2ec521 (diff)
Consider pixel as bad if its value is NaN or infinity
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 63fd54f9..8c47d3cf 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -521,6 +521,8 @@ static int unpack_panels(struct image *image, float *data, int data_width,
bad = 1;
}
+ if ( isnan(data[idx]) || isinf(data[idx]) ) bad = 1;
+
if ( flags != NULL ) {
int f;