diff options
author | Thomas White <taw@physics.org> | 2020-03-05 11:47:41 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:24 +0200 |
commit | 94df5f31d5a91b22991e26cd02bc37763005f2d1 (patch) | |
tree | 569de419937b1b17747e396837ee222e736ea568 /libcrystfel/src/hdf5-file.c | |
parent | 026af04547c22c67886c66d3b1808c4dd3ade997 (diff) |
ImageFeatureList: Store panel number, not pointer
This makes the conversion to DataTemplate/detgeom MUCH easier.
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index e2738a8b..ec0d77f2 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -400,6 +400,7 @@ int get_peaks_cxi_2(struct image *image, struct hdfile *f, const char *p, float fs, ss, val; struct panel *p; + int pn; fs = buf_x[pk] + peak_offset; ss = buf_y[pk] + peak_offset; @@ -413,7 +414,10 @@ int get_peaks_cxi_2(struct image *image, struct hdfile *f, const char *p, fs = fs - p->orig_min_fs; ss = ss - p->orig_min_ss; - image_add_feature(image->features, fs, ss, p, image, val, NULL); + pn = panel_number(image->det, p); + + image_add_feature(image->features, fs, ss, pn, + image, val, NULL); } @@ -543,6 +547,7 @@ int get_peaks_2(struct image *image, struct hdfile *f, const char *p, float fs, ss, val; struct panel *p; + int pn; fs = buf[tw*i+0] + peak_offset; ss = buf[tw*i+1] + peak_offset; @@ -556,8 +561,10 @@ int get_peaks_2(struct image *image, struct hdfile *f, const char *p, fs = fs - p->orig_min_fs; ss = ss - p->orig_min_ss; - image_add_feature(image->features, fs, ss, p, image, val, - NULL); + pn = panel_number(image->det, p); + + image_add_feature(image->features, fs, ss, pn, + image, val, NULL); } |