diff options
author | Thomas White <taw@physics.org> | 2015-05-08 18:29:10 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-05-13 13:48:33 +0200 |
commit | d40b00f74a77c1f9d61158b9e945368f4c5bb64b (patch) | |
tree | a814c78d58e0cf5af8f8760005d692fa92bcf9a1 /src | |
parent | 14de3d1cf8e7f9ed646f6f6804bf2e22207f5e15 (diff) |
Change order of gradient calculation
Diffstat (limited to 'src')
-rw-r--r-- | src/post-refinement.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index 00746c0f..e0436d8a 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -187,6 +187,10 @@ double gradient(Crystal *cr, int k, Reflection *refl, PartialityModel pmodel) get_partial(refl, &rlow, &rhigh, &p); + if ( k == GPARAM_OSF ) { + return -p/(osf*osf); + } + if ( k == GPARAM_R ) { double Rglow, Rghigh; @@ -222,10 +226,6 @@ double gradient(Crystal *cr, int k, Reflection *refl, PartialityModel pmodel) } - if ( k == GPARAM_OSF ) { - return -p/(osf*osf); - } - gr = r_gradient(crystal_get_cell(cr), k, refl, image) * (glow-ghigh); return gr / osf; } |