diff options
-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; } |