diff options
author | Thomas White <taw@physics.org> | 2021-04-01 10:56:05 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-04-01 11:51:31 +0200 |
commit | bb383134d7f2d15578b77186f5b35e6b8c344b71 (patch) | |
tree | c78bdd7107c83e3bf246a76bde08a25c3136954e /libcrystfel/src/image-hdf5.c | |
parent | 33dc8d67a599959333026052e45e9f3dfab2f48d (diff) |
Implement loading of saturation map
Diffstat (limited to 'libcrystfel/src/image-hdf5.c')
-rw-r--r-- | libcrystfel/src/image-hdf5.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 25e9d3f7..7af0e3a6 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -578,6 +578,27 @@ int image_hdf5_read(struct image *image, } +float *image_hdf5_read_satmap(struct panel_template *p, + const char *filename, + const char *event, + const char *map_location) +{ + float *map = NULL; + + if ( load_hdf5_hyperslab(p, filename, event, + (void *)&map, H5T_NATIVE_FLOAT, + sizeof(float), 1, map_location) ) + { + ERROR("Failed to load saturation map data\n"); + free(map); + return NULL; + } + + return map; +} + + + int image_hdf5_read_mask(struct panel_template *p, const char *filename, const char *event, int *bad, const char *mask_location, |