diff options
author | Thomas White <taw@physics.org> | 2010-09-10 16:44:49 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:57 +0100 |
commit | f5276f34b53e558b3a72eb6d13c2ff3c41d674d1 (patch) | |
tree | 7be04658e987df52796a95b935f1ff41ff7d21f3 /src | |
parent | 64b735e37f7b7afa01ec7fa49ab765505c5cbd07 (diff) |
indexamajig: Add --no-closer-peak option
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 9 | ||||
-rw-r--r-- | src/pattern_sim.c | 2 | ||||
-rw-r--r-- | src/peaks.c | 3 | ||||
-rw-r--r-- | src/peaks.h | 3 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index bfce345c..f63936c5 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -63,6 +63,7 @@ struct process_args int config_sanity; int config_satcorr; int config_sa; + int config_closer; float threshold; struct detector *det; IndexingMethod indm; @@ -163,6 +164,9 @@ static void show_help(const char *s) "\n" "\nOptions you probably won't need:\n\n" " --no-check-prefix Don't attempt to correct the --prefix.\n" +" --no-closer-peak Don't integrate from the location of a nearby peak\n" +" instead of the position closest to the reciprocal\n" +" lattice point.\n" ); } @@ -409,7 +413,7 @@ static struct process_result process_image(struct process_args *pargs) if ( config_nearbragg ) { output_intensities(&image, image.indexed_cell, pargs->output_mutex, config_polar, - pargs->config_sa); + pargs->config_sa, pargs->config_closer); } simage = get_simage(&image, config_alternate); @@ -514,6 +518,7 @@ int main(int argc, char *argv[]) int config_satcorr = 0; int config_sa = 1; int config_checkprefix = 1; + int config_closer = 1; float threshold = 800.0; struct detector *det; char *geometry = NULL; @@ -561,6 +566,7 @@ int main(int argc, char *argv[]) {"no-sa", 0, &config_sa, 0}, {"threshold", 1, NULL, 't'}, {"no-check-prefix", 0, &config_checkprefix, 0}, + {"no-closer-peak", 0, &config_closer, 0}, {0, 0, NULL, 0} }; @@ -758,6 +764,7 @@ int main(int argc, char *argv[]) pargs->config_sanity = config_sanity; pargs->config_satcorr = config_satcorr; pargs->config_sa = config_sa; + pargs->config_closer = config_closer; pargs->cell = cell; pargs->det = det; pargs->ipriv = ipriv; diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 23da9b86..4d4ba10f 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -418,7 +418,7 @@ int main(int argc, char *argv[]) if ( config_nearbragg ) { find_projected_peaks(&image, cell); - output_intensities(&image, cell, NULL, 0, 1); + output_intensities(&image, cell, NULL, 0, 1, 0); } if ( powder_fn != NULL ) { diff --git a/src/peaks.c b/src/peaks.c index 7630f965..57736019 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -561,7 +561,8 @@ int peak_sanity_check(struct image *image, UnitCell *cell) void output_intensities(struct image *image, UnitCell *cell, - pthread_mutex_t *mutex, int polar, int sa) + pthread_mutex_t *mutex, int polar, int sa, + int use_closer) { int i; int n_found; diff --git a/src/peaks.h b/src/peaks.h index c5d1fb57..68e104a9 100644 --- a/src/peaks.h +++ b/src/peaks.h @@ -22,7 +22,8 @@ extern void search_peaks(struct image *image, float threshold); extern void dump_peaks(struct image *image, pthread_mutex_t *mutex); extern void output_intensities(struct image *image, UnitCell *cell, - pthread_mutex_t *mutex, int polar, int sa); + pthread_mutex_t *mutex, int polar, int sa, + int use_closer); extern int peak_sanity_check(struct image *image, UnitCell *cell); extern int find_projected_peaks(struct image *image, UnitCell *cell); extern int integrate_peak(struct image *image, int xp, int yp, |