Commit 33c6e3f3 authored by Thomas White's avatar Thomas White
Browse files

Include filename in --near-bragg output

parent b2a409dc
...@@ -76,6 +76,7 @@ struct image { ...@@ -76,6 +76,7 @@ struct image {
UnitCell *candidate_cells[MAX_CELL_CANDIDATES]; UnitCell *candidate_cells[MAX_CELL_CANDIDATES];
int ncells; int ncells;
struct detector det; struct detector det;
const char *filename;
int id; int id;
......
...@@ -188,6 +188,7 @@ static struct image *get_simage(struct image *template, int alternate) ...@@ -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->lambda = ph_en_to_lambda(eV_to_J(1.8e3));
image->features = template->features; image->features = template->features;
image->filename = template->filename;
return image; return image;
} }
...@@ -245,8 +246,9 @@ static void *process_image(void *pargsv) ...@@ -245,8 +246,9 @@ static void *process_image(void *pargsv)
image.data = NULL; image.data = NULL;
image.indexed_cell = NULL; image.indexed_cell = NULL;
image.id = pargs->id; image.id = pargs->id;
image.filename = filename;
STATUS("Processing '%s'\n", filename); STATUS("Processing '%s'\n", image.filename);
result = malloc(sizeof(*result)); result = malloc(sizeof(*result));
if ( result == NULL ) return NULL; if ( result == NULL ) return NULL;
......
...@@ -245,6 +245,7 @@ int main(int argc, char *argv[]) ...@@ -245,6 +245,7 @@ int main(int argc, char *argv[])
image.height = 1024; image.height = 1024;
image.lambda = ph_en_to_lambda(eV_to_J(1790.0)); /* Wavelength */ image.lambda = ph_en_to_lambda(eV_to_J(1790.0)); /* Wavelength */
cell = load_cell_from_pdb("molecule.pdb"); cell = load_cell_from_pdb("molecule.pdb");
image.filename = NULL;
#include "geometry-lcls.tmp" #include "geometry-lcls.tmp"
......
...@@ -404,7 +404,7 @@ void output_intensities(struct image *image, UnitCell *cell) ...@@ -404,7 +404,7 @@ void output_intensities(struct image *image, UnitCell *cell)
/* Explicit printf() used here (not normally allowed) because /* Explicit printf() used here (not normally allowed) because
* we really want to output to stdout */ * 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.w, image->orientation.x,
image->orientation.y, image->orientation.z); image->orientation.y, image->orientation.z);
for ( i=0; i<n_hits; i++ ) { for ( i=0; i<n_hits; i++ ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment