From ec2444d9ab7c3eaf727327779de3f42b487f8a6e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 16 Feb 2012 15:45:54 +0100 Subject: Fussiness --- src/process_hkl.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/process_hkl.c') diff --git a/src/process_hkl.c b/src/process_hkl.c index ac2e567e..d9558842 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -32,9 +32,6 @@ #include "image.h" - - - static void show_help(const char *s) { printf("Syntax: %s [options]\n\n", s); @@ -63,7 +60,7 @@ static void show_help(const char *s) " -g, --histogram= Calculate the histogram of measurements for this\n" " reflection.\n" " -z, --hist-parameters Set the range for the histogram and the number of\n" -" = bins. \n" +" = bins. \n" "\n" " --scale Scale each pattern for best fit with the current\n" " model.\n" @@ -100,7 +97,7 @@ static void plot_histogram(double *vals, int n, float hist_min, float hist_max, min = hist_min; max = hist_max; } - STATUS("min max nbins: \n %f %f %i\n", min, max, nbins); + STATUS("min max nbins: %f %f %i\n", min, max, nbins); min--; max++; for ( i=0; i ", hist_h, hist_k, hist_l); + /* Put into the asymmetric cell for the target group */ get_asymm(sym, hist_h, hist_k, hist_l, &hist_h, &hist_k, &hist_l); STATUS("%i %i %i\n", hist_h, hist_k, hist_l); + } if ( histo_params != NULL ) { + int rr; - rr = sscanf(histo_params, "%f,%f,%i", &hist_min, &hist_max, &hist_nbins); + + rr = sscanf(histo_params, "%f,%f,%i", &hist_min, &hist_max, + &hist_nbins); if ( rr != 3 ) { ERROR("Invalid parameters for '--hist-parameters'\n"); return 1; } free(histo_params); - if ( (hist_max - hist_min) <=0 ) { - ERROR("Invalid range for '--hist-parameters' : check if min