From 2f06e6a1abf28a22cf78a6c3d89596bec2a6a8c5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 5 Feb 2013 18:05:30 +0100 Subject: Fixes for indexing pipeline --- libcrystfel/src/index.c | 6 +++--- libcrystfel/src/mosflm.h | 4 ++++ libcrystfel/src/peaks.c | 10 ++++------ libcrystfel/src/stream.c | 18 ++---------------- libcrystfel/src/stream.h | 10 ++++++++++ 5 files changed, 23 insertions(+), 25 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 821be39a..cd6628e9 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -68,7 +68,6 @@ IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell, IndexingPrivate **iprivs; while ( indm[nm] != INDEXING_NONE ) nm++; - STATUS("Preparing %i indexing method%s.\n", nm, maybes(nm)); iprivs = malloc((nm+1) * sizeof(IndexingPrivate *)); for ( n=0; ncrystals == NULL ) return mask; for ( i=0; in_crystals; i++ ) { - add_crystal_to_mask(image, p, ir_inn, ir_out, + add_crystal_to_mask(image, p, ir_inn, w, h, mask, image->crystals[i]); } @@ -860,8 +859,7 @@ void integrate_reflections(struct image *image, int use_closer, int bgsub, } for ( i=0; idet->n_panels; i++ ) { int *mask; - mask = make_BgMask(image, &image->det->panels[i], - ir_out, ir_inn); + mask = make_BgMask(image, &image->det->panels[i], ir_inn); if ( mask == NULL ) { ERROR("Couldn't create background mask.\n"); return; diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 113dc359..fbcbaf2e 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -52,16 +52,6 @@ #define LATEST_MAJOR_VERSION (2) #define LATEST_MINOR_VERSION (1) -#define CHUNK_START_MARKER "----- Begin chunk -----" -#define CHUNK_END_MARKER "----- End chunk -----" -#define PEAK_LIST_START_MARKER "Peaks from peak search" -#define PEAK_LIST_END_MARKER "End of peak list" -#define CRYSTAL_START_MARKER "--- Begin crystal" -#define CRYSTAL_END_MARKER "--- End crystal" -#define REFLECTION_START_MARKER "Reflections measured after indexing" -/* REFLECTION_END_MARKER is over in reflist-utils.h because it is also - * used to terminate a standalone list of reflections */ - struct _stream { @@ -184,8 +174,6 @@ static void write_crystal(Stream *st, Crystal *cr, int include_reflections) if ( include_reflections ) { - fprintf(st->fh, "\n"); - if ( reflist != NULL ) { fprintf(st->fh, REFLECTION_START_MARKER"\n"); @@ -199,7 +187,7 @@ static void write_crystal(Stream *st, Crystal *cr, int include_reflections) } } - fprintf(st->fh, CRYSTAL_START_MARKER"\n\n"); + fprintf(st->fh, CRYSTAL_END_MARKER"\n"); } @@ -226,19 +214,17 @@ void write_chunk(Stream *st, struct image *i, struct hdfile *hdfile, copy_hdf5_fields(hdfile, i->copyme, st->fh); if ( include_peaks ) { - fprintf(st->fh, "\n"); write_peaks(i, st->fh); } fprintf(st->fh, "photon_energy_eV = %f\n", J_to_eV(ph_lambda_to_en(i->lambda))); - fprintf(st->fh, "\n"); for ( j=0; jn_crystals; j++ ) { write_crystal(st, i->crystals[j], include_reflections); } - fprintf(st->fh, CHUNK_END_MARKER"\n\n"); + fprintf(st->fh, CHUNK_END_MARKER"\n"); fflush(st->fh); } diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h index 4d561cd2..cdce0ea2 100644 --- a/libcrystfel/src/stream.h +++ b/libcrystfel/src/stream.h @@ -38,6 +38,16 @@ struct image; struct hdfile; +#define CHUNK_START_MARKER "----- Begin chunk -----" +#define CHUNK_END_MARKER "----- End chunk -----" +#define PEAK_LIST_START_MARKER "Peaks from peak search" +#define PEAK_LIST_END_MARKER "End of peak list" +#define CRYSTAL_START_MARKER "--- Begin crystal" +#define CRYSTAL_END_MARKER "--- End crystal" +#define REFLECTION_START_MARKER "Reflections measured after indexing" +/* REFLECTION_END_MARKER is over in reflist-utils.h because it is also + * used to terminate a standalone list of reflections */ + typedef struct _stream Stream; extern Stream *open_stream_for_read(const char *filename); -- cgit v1.2.3