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-hdf5.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-hdf5.c')
-rw-r--r-- | libcrystfel/src/image-hdf5.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index ce357f36..702c1392 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -1354,9 +1354,8 @@ ImageFeatureList *image_hdf5_read_peaks_cxi(const DataTemplate *dtempl, ss = buf_y[pk] + peak_offset; val = buf_i[pk]; - if ( data_template_file_to_panel_coords(dtempl, - &fs, &ss, - &pn) ) + 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); @@ -1477,9 +1476,8 @@ ImageFeatureList *image_hdf5_read_peaks_hdf5(const DataTemplate *dtempl, ss = buf[tw*i+1] + peak_offset; val = buf[tw*i+2]; - if ( data_template_file_to_panel_coords(dtempl, - &fs, &ss, - &pn) ) + 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); |