diff options
author | Thomas White <taw@physics.org> | 2022-03-08 15:18:27 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-03-08 17:41:52 +0100 |
commit | dad7c029fdfc1d0a475a86a01ecb02d2adc16dc2 (patch) | |
tree | 2e79bb418309fd9c6cd75484678fa01b374f1658 /libcrystfel/src/image-msgpack.c | |
parent | 0b758e3ae3c3fd66c75a42740a80afbabba5c82f (diff) |
Fix slabbiness assumptions
This adds a new routine, data_template_slabby_file_to_panel_coords, to
be used (only!) in places where external forces require assumptions of
slabbiness: pixel maps and MsgPack/HDF5 peak lists (including
CXI-style).
This also fixes the prototype of data_template_file_to_panel_coords to
make the panel number strictly an input parameter. This was an
oversight in the implementation of DataTemplate, and caused problems
when reading non-slabby streams.
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/66
Diffstat (limited to 'libcrystfel/src/image-msgpack.c')
-rw-r--r-- | libcrystfel/src/image-msgpack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libcrystfel/src/image-msgpack.c b/libcrystfel/src/image-msgpack.c index a92fb49d..11876b7c 100644 --- a/libcrystfel/src/image-msgpack.c +++ b/libcrystfel/src/image-msgpack.c @@ -216,8 +216,9 @@ ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dtempl, val = peak_i->via.array.ptr[pk].via.f64; /* Convert coordinates to panel-relative */ - if ( data_template_file_to_panel_coords(dtempl, &fs, &ss, &pn) ) { - ERROR("Peak not in panel!\n"); + if ( data_template_slabby_file_to_panel_coords(dtempl, &fs, &ss, &pn) ) { + ERROR("Failed to convert %i,%i to " + "panel-relative coordinates\n", fs, ss); } else { image_add_feature(features, fs, ss, pn, NULL, val, NULL); |