diff options
author | Thomas White <taw@physics.org> | 2010-08-17 18:27:24 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:55 +0100 |
commit | 3bfd8f444202eb427debdd3f218aa31fa0a35590 (patch) | |
tree | 165f668da882fe8ab9734a535483ede85850e3d3 /src/templates.c | |
parent | 93aa7b124f6f971f253326f347d5104d96f14d6e (diff) |
Use detector geometry when generating templates
Also, add progress bar.
Diffstat (limited to 'src/templates.c')
-rw-r--r-- | src/templates.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/templates.c b/src/templates.c index fd4616b2..e4355295 100644 --- a/src/templates.c +++ b/src/templates.c @@ -86,7 +86,8 @@ UnitCell *rotate_cell(UnitCell *in, double omega, double phi) /* Generate templates for the given cell using a representative image */ -IndexingPrivate *generate_templates(UnitCell *cell, const char *filename) +IndexingPrivate *generate_templates(UnitCell *cell, const char *filename, + struct detector *det) { struct _indexingprivate_template *priv; const char *holo; @@ -107,6 +108,7 @@ IndexingPrivate *generate_templates(UnitCell *cell, const char *filename) } hdf5_read(hdfile, &image, 0); hdfile_close(hdfile); + image.det = det; priv = calloc(1, sizeof(struct _indexingprivate_template)); priv->base.indm = INDEXING_TEMPLATE; @@ -149,13 +151,11 @@ IndexingPrivate *generate_templates(UnitCell *cell, const char *filename) return NULL; } - STATUS("%.2f, %.2f : %i features\n", - rad2deg(omega), rad2deg(phi), n); - free(cell_rot); } - STATUS("Finished omega=%.2f\n", rad2deg(omega)); + progress_bar(omega*1000.0, (omega_max-omega_step)*1000.0, + "Generating templates"); } priv->n_templates = n_templates; |