From 4e0fe58f0d35f2a73f718917b2b99dc17fb9f7dd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 30 May 2012 17:17:11 +0200 Subject: Formatting --- src/render_hkl.c | 58 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 22 deletions(-) (limited to 'src/render_hkl.c') diff --git a/src/render_hkl.c b/src/render_hkl.c index a63cbad3..a01e7609 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -118,23 +118,29 @@ static double max_value(RefList *list, int wght, const SymOpList *sym) n = num_equivs(sym, m); switch ( wght ) { - case WGHT_I : + + case WGHT_I : val = get_intensity(refl); break; - case WGHT_SQRTI : + + case WGHT_SQRTI : val = get_intensity(refl); val = (val>0.0) ? sqrt(val) : 0.0; break; - case WGHT_COUNTS : + + case WGHT_COUNTS : val = get_redundancy(refl); val /= (double)n; break; - case WGHT_RAWCOUNTS : + + case WGHT_RAWCOUNTS : val = get_redundancy(refl); break; - default : + + default : ERROR("Invalid weighting.\n"); abort(); + } if ( val > max ) max = val; @@ -192,23 +198,29 @@ static void draw_circles(double xh, double xk, double xl, yi = (h*yh + k*yk + l*yl) / ny; switch ( wght) { - case WGHT_I : + + case WGHT_I : val = get_intensity(refl); break; - case WGHT_SQRTI : + + case WGHT_SQRTI : val = get_intensity(refl); val = (val>0.0) ? sqrt(val) : 0.0; break; - case WGHT_COUNTS : + + case WGHT_COUNTS : val = get_redundancy(refl); val /= (double)n; break; - case WGHT_RAWCOUNTS : + + case WGHT_RAWCOUNTS : val = get_redundancy(refl); break; - default : + + default : ERROR("Invalid weighting.\n"); abort(); + } /* Absolute location in image based on 2D basis */ @@ -621,43 +633,44 @@ int main(int argc, char *argv[]) longopts, NULL)) != -1) { switch (c) { - case 'h' : + + case 'h' : show_help(argv[0]); return 0; - case 'p' : + case 'p' : pdb = strdup(optarg); break; - case 'b' : + case 'b' : boost = atof(optarg); break; - case 'y' : + case 'y' : sym_str = strdup(optarg); break; - case 'w' : + case 'w' : weighting = strdup(optarg); break; - case 'c' : + case 'c' : cscale = strdup(optarg); break; - case 'd' : + case 'd' : down = strdup(optarg); break; - case 'r' : + case 'r' : right = strdup(optarg); break; - case 'o' : + case 'o' : outfile = strdup(optarg); break; - case 2 : + case 2 : errno = 0; scale_top = strtod(optarg, &endptr); if ( !( (optarg[0] != '\0') && (endptr[0] == '\0') ) @@ -672,11 +685,12 @@ int main(int argc, char *argv[]) } break; - case 0 : + case 0 : break; - default : + default : return 1; + } } -- cgit v1.2.3