diff options
author | Thomas White <taw@physics.org> | 2012-05-22 15:12:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-05-22 15:12:51 +0200 |
commit | 9af9d74f4d3260972566651f534e3e797da7543f (patch) | |
tree | c9b79cbcb85eb93dc9e99babb405bd30c4d6bd10 /src | |
parent | 8aae37896eab7414ab5f384e4152f72e57d0c788 (diff) | |
parent | f080e3ac0a741e55d573e14c98c1e0250fb881df (diff) |
Merge branch 'master' into tom/speed
Diffstat (limited to 'src')
-rw-r--r-- | src/dw-hdfsee.c | 8 | ||||
-rw-r--r-- | src/partialator.c | 2 | ||||
-rw-r--r-- | src/post-refinement.c | 32 | ||||
-rw-r--r-- | src/process_hkl.c | 3 |
4 files changed, 28 insertions, 17 deletions
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, "-"); } 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) { 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; } diff --git a/src/process_hkl.c b/src/process_hkl.c index 4164d6f6..26abfd4f 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; |