diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2017-03-11 01:56:56 +0100 |
---|---|---|
committer | Valerio Mariani <valerio.mariani@desy.de> | 2017-03-11 01:56:56 +0100 |
commit | 9fbb940ee46cfafe9f5bb80da647916074512aea (patch) | |
tree | 55002a3a09be183446f083c78232e9abe8895ac8 /libcrystfel/src | |
parent | de2237fc3f193e4f4916e3bc9268e52378fad939 (diff) |
Fixed some more bugs reported by Yaroslav
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/peakfinder8.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libcrystfel/src/peakfinder8.c b/libcrystfel/src/peakfinder8.c index c312e120..fecc61da 100644 --- a/libcrystfel/src/peakfinder8.c +++ b/libcrystfel/src/peakfinder8.c @@ -930,6 +930,9 @@ int peakfinder8(struct image *img, int max_n_peaks, int pi; int ret; int num_found_peaks; + int iterations; + + iterations = 5; if ( img-> det == NULL) { return 1; @@ -941,7 +944,7 @@ int peakfinder8(struct image *img, int max_n_peaks, } pfmask = create_peakfinder_mask(img, rmaps, min_res, max_res); - if ( rmaps == NULL ) { + if ( pfmask == NULL ) { free_radius_maps(rmaps); return 1; } @@ -950,6 +953,7 @@ int peakfinder8(struct image *img, int max_n_peaks, if ( pfdata == NULL) { free_radius_maps(rmaps); free_peakfinder_mask(pfmask); + return 1; } for ( pi=0 ; pi<img->det->n_panels ; pi++ ) { @@ -976,7 +980,7 @@ int peakfinder8(struct image *img, int max_n_peaks, rmaps->r_maps, pfmask->masks, rstats->rthreshold, rstats->roffset, num_rad_bins, - min_snr, threshold, 5); + min_snr, threshold, iterations); if ( ret != 0 ) { free_radius_maps(rmaps); free_peakfinder_mask(pfmask); @@ -1001,6 +1005,10 @@ int peakfinder8(struct image *img, int max_n_peaks, num_found_peaks = 0; + if ( img->det->panels[pi].no_index ) { + continue; + } + ret = peakfinder8_singlepanel(rstats->roffset, rstats->rthreshold, pfdata->panel_data[pi], |