aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-06 16:31:55 +0200
committerThomas White <taw@physics.org>2010-04-06 17:07:53 +0200
commit33c6e3f3250c983a13f9967b4ae4923fa7b5cd18 (patch)
treeb0707b930211c4a7b7b4e69d30f721e383c99139
parentb2a409dc46dbd1a1636cba61eda573fc7e379f41 (diff)
Include filename in --near-bragg output
-rw-r--r--src/image.h1
-rw-r--r--src/indexamajig.c4
-rw-r--r--src/pattern_sim.c1
-rw-r--r--src/peaks.c2
4 files changed, 6 insertions, 2 deletions
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<n_hits; i++ ) {