diff options
author | Thomas White <taw@physics.org> | 2019-04-02 15:55:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-04-03 15:53:07 +0200 |
commit | 0a1a129583fdd191045df501d22a0342f612e548 (patch) | |
tree | 30ae20f574ca091c14baa8d45e3b51ddfdf36152 /libcrystfel/src/image.c | |
parent | e64e2ec6879410dc90c5d87f58268dd3eb2ec521 (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.c | 2 |
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; |