From 33c6e3f3250c983a13f9967b4ae4923fa7b5cd18 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 6 Apr 2010 16:31:55 +0200 Subject: Include filename in --near-bragg output --- src/image.h | 1 + src/indexamajig.c | 4 +++- src/pattern_sim.c | 1 + src/peaks.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/image.h b/src/image.h index 39719acf..4ba9e5f9 100644 --- a/src/image.h +++ b/src/image.h @@ -76,6 +76,7 @@ struct image { UnitCell *candidate_cells[MAX_CELL_CANDIDATES]; int ncells; struct detector det; + const char *filename; int id; diff --git a/src/indexamajig.c b/src/indexamajig.c index 3668adf8..f4733883 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -188,6 +188,7 @@ static struct image *get_simage(struct image *template, int alternate) image->lambda = ph_en_to_lambda(eV_to_J(1.8e3)); image->features = template->features; + image->filename = template->filename; return image; } @@ -245,8 +246,9 @@ static void *process_image(void *pargsv) image.data = NULL; image.indexed_cell = NULL; image.id = pargs->id; + image.filename = filename; - STATUS("Processing '%s'\n", filename); + STATUS("Processing '%s'\n", image.filename); result = malloc(sizeof(*result)); if ( result == NULL ) return NULL; diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 295c4e6d..473b768f 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -245,6 +245,7 @@ int main(int argc, char *argv[]) image.height = 1024; image.lambda = ph_en_to_lambda(eV_to_J(1790.0)); /* Wavelength */ cell = load_cell_from_pdb("molecule.pdb"); + image.filename = NULL; #include "geometry-lcls.tmp" diff --git a/src/peaks.c b/src/peaks.c index db609113..b44bd011 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -404,7 +404,7 @@ void output_intensities(struct image *image, UnitCell *cell) /* Explicit printf() used here (not normally allowed) because * we really want to output to stdout */ - printf("New pattern: %7.5f %7.5f %7.5f %7.5f\n", + printf("New pattern: %s %7.5f %7.5f %7.5f %7.5f\n", image->filename, image->orientation.w, image->orientation.x, image->orientation.y, image->orientation.z); for ( i=0; i