Commit 254d6459 authored by Thomas White's avatar Thomas White
Browse files

indexamajig: Reduce verbosity a lot

parent e397d27f
......@@ -795,11 +795,6 @@ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose,
}
}
if ( new_cell != NULL ) {
STATUS("Success! --------------- \n");
cell_print(new_cell);
}
free(cand[0]);
free(cand[1]);
free(cand[2]);
......
......@@ -161,7 +161,6 @@ int get_peaks(struct image *image, struct hdfile *f)
image_add_feature(image->features, fs, ss, image, val, NULL);
}
STATUS("Got %i peaks from peak list.\n", (int)size[0]);
free(buf);
H5Sclose(sh);
......@@ -323,7 +322,6 @@ static void debodge_saturation(struct hdfile *f, struct image *image)
if ( dh < 0 ) {
/* This isn't an error */
STATUS("No saturation table found.\n");
return;
}
......
......@@ -140,16 +140,13 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
case INDEXING_NONE :
return;
case INDEXING_DIRAX :
STATUS("Running DirAx...\n");
run_dirax(image);
break;
case INDEXING_MOSFLM :
STATUS("Running MOSFLM...\n");
run_mosflm(image, cell);
break;
}
if ( image->ncells == 0 ) {
STATUS("No candidate cells found.\n");
n++;
continue;
}
......@@ -200,7 +197,6 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
/* Sanity check */
if ( !config_insane &&
!peak_sanity_check(image, new_cell, 0, 0.1) ) {
STATUS("Failed peak sanity check.\n");
cell_free(new_cell);
continue;
}
......
......@@ -23,7 +23,7 @@
#include <hdf5.h>
#include <gsl/gsl_errno.h>
#include <pthread.h>
#include <sys/time.h>
#include <time.h>
#include "utils.h"
#include "hdf5-file.h"
......@@ -38,6 +38,10 @@
#include "reflist-utils.h"
#define STATS_EVERY_N_SECONDS (5)
enum {
PEAK_ZAEF,
PEAK_HDF5,
......@@ -92,9 +96,13 @@ struct queue_args
int config_basename;
struct static_index_args static_args;
int n_indexable;
char *use_this_one_instead;
int n_indexable;
int n_processed;
int n_indexable_last_stats;
int n_processed_last_stats;
int t_last_stats;
};
......@@ -210,8 +218,6 @@ static void process_image(void *pp, int cookie)
image.filename = filename;
image.det = copy_geom(pargs->static_args.det);
STATUS("Processing '%s'\n", image.filename);
pargs->indexable = 0;
hdfile = hdfile_open(filename);
......@@ -384,8 +390,26 @@ static void finalise_image(void *qp, void *pp)
{
struct queue_args *qargs = qp;
struct index_args *pargs = pp;
struct timespec tp;
qargs->n_indexable += pargs->indexable;
qargs->n_processed++;
clock_gettime(CLOCK_REALTIME, &tp);
if ( tp.tv_sec > qargs->t_last_stats+STATS_EVERY_N_SECONDS ) {
STATUS("%i out of %i indexed so far,"
" %i out of %i in the last %i seconds.\n",
qargs->n_indexable, qargs->n_processed,
qargs->n_indexable - qargs->n_indexable_last_stats,
qargs->n_processed - qargs->n_processed_last_stats,
STATS_EVERY_N_SECONDS);
qargs->n_processed_last_stats = qargs->n_processed;
qargs->n_indexable_last_stats = qargs->n_indexable;
qargs->t_last_stats = tp.tv_sec;
}
free(pargs->filename);
free(pargs);
......@@ -439,6 +463,7 @@ int main(int argc, char *argv[])
char *element = NULL;
double nominal_photon_energy;
int stream_flags = STREAM_INTEGRATED;
struct timespec tp;
/* Long options */
const struct option longopts[] = {
......@@ -759,6 +784,12 @@ int main(int argc, char *argv[])
qargs.prefix = prefix;
qargs.config_basename = config_basename;
qargs.n_indexable = 0;
qargs.n_processed = 0;
qargs.n_indexable_last_stats = 0;
qargs.n_processed_last_stats = 0;
clock_gettime(CLOCK_REALTIME, &tp);
qargs.t_last_stats = tp.tv_sec;
n_images = run_threads(nthreads, process_image, get_image,
finalise_image, &qargs, 0);
......
......@@ -492,7 +492,6 @@ RefList *find_projected_peaks(struct image *image, UnitCell *cell,
optimise_reflist(reflections);
STATUS("Found %i reflections\n", n_reflections);
return reflections;
}
......@@ -559,8 +558,6 @@ int peak_sanity_check(struct image *image, UnitCell *cell,
}
STATUS("Sanity factor: %f / %f = %f\n", (float)n_sane, (float)n_feat,
(float)n_sane / (float)n_feat);
if ( (float)n_sane / (float)n_feat < 0.1 ) return 0;
return 1;
......
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