diff options
author | Thomas White <taw@physics.org> | 2020-07-01 16:33:29 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | efe55592b5579be2d57823f84a610c431e386b07 (patch) | |
tree | af63a26122f2d8abdfc0fd43a009d15552bf8cd9 /libcrystfel | |
parent | 280eb2a5c9897ece5bb57b926e2a759a628e0c78 (diff) |
Improve error message when peak list is not given in DataTemplate
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/image-hdf5.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 7d6363ac..767ef6ab 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -1066,6 +1066,11 @@ ImageFeatureList *image_hdf5_read_peaks_hdf5(const DataTemplate *dtempl, ImageFeatureList *features; double peak_offset = half_pixel_shift ? 0.5 : 0.0; + if ( dtempl->peak_list == NULL ) { + ERROR("Peak location is not given in geometry file.\n"); + return NULL; + } + if ( access(filename, R_OK) == -1 ) { ERROR("File does not exist or cannot be read: %s\n", filename); |