Msgpack nan masking bug
Hi @thomas.white, here's the bad pixel mask indexing bug we discussed in the msgpack data reading code. When trying to push a branch to create a merge request, I found that I am not allowed to push code to this project. Luckily, it's just a single line fix; here's the diff:
diff --git a/libcrystfel/src/image-msgpack.c b/libcrystfel/src/image-msgpack.c
index f6d6f2dd..2201b4f5 100644
--- a/libcrystfel/src/image-msgpack.c
+++ b/libcrystfel/src/image-msgpack.c
@@ -417,7 +417,7 @@ static int load_msgpack_data(struct panel_template *p,
size_t idx = fs+p->orig_min_fs + (ss+p->orig_min_ss)*data_size_fs;
data[fs+ss*PANEL_WIDTH(p)] = in_data[idx];
if ( !isfinite(in_data[idx]) ) {
- bad[idx] = 1;
+ bad[fs+ss*PANEL_WIDTH(p)] = 1;
}
}
}