From ef95c575baf47df7349146e852102b7dd2db0d4f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 24 Oct 2014 17:50:59 +0200 Subject: Put write_stream_reflections_*() in the right order This changes nothing else, I promise --- libcrystfel/src/stream.c | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 86231309..e4ed4caf 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -395,13 +395,13 @@ static RefList *read_stream_reflections_2_2(FILE *fh) } -static void write_stream_reflections_2_2(FILE *fh, RefList *list) +static void write_stream_reflections_2_1(FILE *fh, RefList *list) { Reflection *refl; RefListIterator *iter; - fprintf(fh, " h k l I sigma(I) " - "peak background fs/px ss/px\n"); + fprintf(fh, " h k l I phase sigma(I) " + " counts fs/px ss/px\n"); for ( refl = first_refl(list, &iter); refl != NULL; @@ -409,34 +409,42 @@ static void write_stream_reflections_2_2(FILE *fh, RefList *list) { signed int h, k, l; - double intensity, esd_i, bg, pk; + double intensity, esd_i, ph; + int red; double fs, ss; + char phs[16]; + int have_phase; get_indices(refl, &h, &k, &l); get_detector_pos(refl, &fs, &ss); intensity = get_intensity(refl); esd_i = get_esd_intensity(refl); - pk = get_peak(refl); - bg = get_mean_bg(refl); + red = get_redundancy(refl); + ph = get_phase(refl, &have_phase); /* Reflections with redundancy = 0 are not written */ - if ( get_redundancy(refl) == 0 ) continue; + if ( red == 0 ) continue; - fprintf(fh, "%4i %4i %4i %10.2f %10.2f %10.2f %10.2f" - " %6.1f %6.1f\n", - h, k, l, intensity, esd_i, pk, bg, fs, ss); + if ( have_phase ) { + snprintf(phs, 16, "%8.2f", rad2deg(ph)); + } else { + strncpy(phs, " -", 15); + } + + fprintf(fh, "%3i %3i %3i %10.2f %s %10.2f %7i %6.1f %6.1f\n", + h, k, l, intensity, phs, esd_i, red, fs, ss); } } -static void write_stream_reflections_2_1(FILE *fh, RefList *list) +static void write_stream_reflections_2_2(FILE *fh, RefList *list) { Reflection *refl; RefListIterator *iter; - fprintf(fh, " h k l I phase sigma(I) " - " counts fs/px ss/px\n"); + fprintf(fh, " h k l I sigma(I) " + "peak background fs/px ss/px\n"); for ( refl = first_refl(list, &iter); refl != NULL; @@ -444,30 +452,22 @@ static void write_stream_reflections_2_1(FILE *fh, RefList *list) { signed int h, k, l; - double intensity, esd_i, ph; - int red; + double intensity, esd_i, bg, pk; double fs, ss; - char phs[16]; - int have_phase; get_indices(refl, &h, &k, &l); get_detector_pos(refl, &fs, &ss); intensity = get_intensity(refl); esd_i = get_esd_intensity(refl); - red = get_redundancy(refl); - ph = get_phase(refl, &have_phase); + pk = get_peak(refl); + bg = get_mean_bg(refl); /* Reflections with redundancy = 0 are not written */ - if ( red == 0 ) continue; - - if ( have_phase ) { - snprintf(phs, 16, "%8.2f", rad2deg(ph)); - } else { - strncpy(phs, " -", 15); - } + if ( get_redundancy(refl) == 0 ) continue; - fprintf(fh, "%3i %3i %3i %10.2f %s %10.2f %7i %6.1f %6.1f\n", - h, k, l, intensity, phs, esd_i, red, fs, ss); + fprintf(fh, "%4i %4i %4i %10.2f %10.2f %10.2f %10.2f" + " %6.1f %6.1f\n", + h, k, l, intensity, esd_i, pk, bg, fs, ss); } } -- cgit v1.2.3