From 7f221c3bfbc5ad41016a451c778f7b8710be03ef Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 19 Apr 2012 16:49:20 +0200 Subject: Formatting --- src/post-refinement.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/post-refinement.c b/src/post-refinement.c index 2ff408eb..cf7b2576 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -147,7 +147,7 @@ double gradient(struct image *image, int k, Reflection *refl, double r) * of excitation error wrt whatever. */ switch ( k ) { - case REF_DIV : + case REF_DIV : gr = 0.0; if ( clamp_low == 0 ) { nom = sqrt(2.0) * ds * sin(image->div/2.0); @@ -162,7 +162,7 @@ double gradient(struct image *image, int k, Reflection *refl, double r) if ( isnan(gr) ) gr = 0.0; /* FIXME: This isn't true (?) */ return gr / 4.0; /* FIXME: Shameless fudge factor */ - case REF_R : + case REF_R : g = 0.0; if ( clamp_low == 0 ) { g += partiality_rgradient(r1, r); @@ -172,24 +172,32 @@ double gradient(struct image *image, int k, Reflection *refl, double r) } return g; - /* Cell parameters and orientation */ - case REF_ASX : + /* Cell parameters and orientation */ + case REF_ASX : return hs * sin(tt) * cos(azix) * g; - case REF_BSX : + + case REF_BSX : return ks * sin(tt) * cos(azix) * g; - case REF_CSX : + + case REF_CSX : return ls * sin(tt) * cos(azix) * g; - case REF_ASY : + + case REF_ASY : return hs * sin(tt) * cos(aziy) * g; - case REF_BSY : + + case REF_BSY : return ks * sin(tt) * cos(aziy) * g; - case REF_CSY : + + case REF_CSY : return ls * sin(tt) * cos(aziy) * g; - case REF_ASZ : + + case REF_ASZ : return hs * cos(tt) * g; - case REF_BSZ : + + case REF_BSZ : return ks * cos(tt) * g; - case REF_CSZ : + + case REF_CSZ : return ls * cos(tt) * g; } -- cgit v1.2.3 From a134eaaba8db820739ff4ce4f9a7044ca3422d27 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 24 Apr 2012 14:15:50 +0200 Subject: partialator: Fix short options --- src/partialator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/partialator.c b/src/partialator.c index fa0698b5..91f2ff99 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) } /* Short options */ - while ((c = getopt_long(argc, argv, "hi:g:x:j:y:o:b:r:", + while ((c = getopt_long(argc, argv, "hi:o:g:b:y:n:r:j:", longopts, NULL)) != -1) { -- cgit v1.2.3 From cfbbdae0ff6b0823fd9de0971f51b9fd939db5b6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 26 Apr 2012 14:08:12 +0200 Subject: indexamajig: Make --no-closer-peak the default --- src/indexamajig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/indexamajig.c b/src/indexamajig.c index 281cac43..8c073e2c 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -228,9 +228,8 @@ 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" +" --closer-peak Don't integrate from the location of a nearby peak\n" +" instead of the predicted spot. Don't use.\n" " --insane Don't check that the reduced cell accounts for at\n" " least 10%% of the located peaks.\n" " --no-bg-sub Don't subtract local background estimates from\n" @@ -561,7 +560,7 @@ int main(int argc, char *argv[]) int config_verbose = 0; int config_satcorr = 1; int config_checkprefix = 1; - int config_closer = 1; + int config_closer = 0; int config_insane = 0; int config_bgsub = 1; int config_basename = 0; @@ -630,6 +629,7 @@ int main(int argc, char *argv[]) {"threshold", 1, NULL, 't'}, {"no-check-prefix", 0, &config_checkprefix, 0}, {"no-closer-peak", 0, &config_closer, 0}, + {"closer-peak", 0, &config_closer, 1}, {"insane", 0, &config_insane, 1}, {"image", 1, NULL, 'e'}, {"basename", 0, &config_basename, 1}, -- cgit v1.2.3 From 817ce63505c93f00117439eee6b11934f6cd4b1d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 26 Apr 2012 14:11:16 +0200 Subject: Tidy up a bit in src/dw-hdfsee.c --- src/dw-hdfsee.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 3881d162..de03c62b 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1340,7 +1340,6 @@ static void numbers_update(DisplayWindow *dw) for ( py=0; py<17; py++ ) { char s[32]; - float val; GtkWidget *l; int x, y; int invalid; @@ -1355,11 +1354,13 @@ static void numbers_update(DisplayWindow *dw) /* Map from unbinned mapped pixel coordinates to a panel */ invalid = reverse_2d_mapping(x, y, &dfs, &dss, dw->image->det); fs = dfs; ss = dss; + if ( !invalid ) { + + float val; + val = dw->image->data[fs+ss*dw->image->width]; - } - if ( !invalid ) { if ( val > 0.0 ) { if ( log(val)/log(10.0) < 5 ) { snprintf(s, 31, "%.0f", val); @@ -1373,6 +1374,7 @@ static void numbers_update(DisplayWindow *dw) snprintf(s, 31, "-HUGE"); } } + } else { strcpy(s, "-"); } -- cgit v1.2.3 From 6b385f0defdd9535347896c2094e83230610b80c Mon Sep 17 00:00:00 2001 From: Lorenzo Galli Date: Fri, 18 May 2012 14:44:46 +0200 Subject: fixed --histogram in process_hkl --- src/process_hkl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/process_hkl.c b/src/process_hkl.c index 4164d6f6..d72a8d91 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -502,7 +502,8 @@ int main(int argc, char *argv[]) hist_i = 0; merge_all(fh, model, NULL, config_startafter, config_stopafter, - sym, n_total_patterns, NULL, 0, 0, 0, NULL); + sym, n_total_patterns, hist_vals, hist_h, hist_k, hist_l, + &hist_i); if ( ferror(fh) ) { ERROR("Stream read error.\n"); return 1; -- cgit v1.2.3 From 4aa325f2d840d8a2d0eeaff3d0c72bab39b51b5e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 18 May 2012 16:30:45 +0200 Subject: Whitespace --- src/process_hkl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/process_hkl.c b/src/process_hkl.c index d72a8d91..26abfd4f 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -502,8 +502,8 @@ int main(int argc, char *argv[]) hist_i = 0; merge_all(fh, model, NULL, config_startafter, config_stopafter, - sym, n_total_patterns, hist_vals, hist_h, hist_k, hist_l, - &hist_i); + sym, n_total_patterns, hist_vals, hist_h, hist_k, hist_l, + &hist_i); if ( ferror(fh) ) { ERROR("Stream read error.\n"); return 1; -- cgit v1.2.3