diff options
author | Thomas White <taw@physics.org> | 2016-10-06 17:46:18 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-06 17:46:18 +0200 |
commit | 44c3496f9bbd908e43583d3d2d6d79ee11a8528c (patch) | |
tree | 2efb1ddb6e9e52bd8ad7147ff37aba2880968c96 | |
parent | 553b0b3d94cb5b09956cf06c8ae3a08a00af6796 (diff) |
hdf5_write_image(): Write the correct data
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index f0dc6a3c..a9a85ce3 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -701,7 +701,7 @@ static struct hdf5_write_location *make_location_list(struct detector *det, } -static void write_location(hid_t fh, struct detector *det, float *data, +static void write_location(hid_t fh, struct detector *det, float **dp, struct hdf5_write_location *loc) { hid_t sh, dh, ph; @@ -761,7 +761,7 @@ static void write_location(hid_t fh, struct detector *det, float *data, memspace = H5Screate_simple(2, dims, NULL); r = H5Dwrite(dh, H5T_NATIVE_FLOAT, memspace, dh_dataspace, - H5P_DEFAULT, data); + H5P_DEFAULT, dp[loc->panel_idxs[pi]]); if ( r < 0 ) { ERROR("Couldn't write data\n"); H5Pclose(ph); @@ -923,7 +923,7 @@ int hdf5_write_image(const char *filename, const struct image *image, &num_locations); for ( li=0; li<num_locations; li++ ) { - write_location(fh, image->det, image->dp[li], &locations[li]); + write_location(fh, image->det, image->dp, &locations[li]); } if ( image->beam == NULL |