diff options
author | Thomas White <taw@physics.org> | 2011-04-29 18:59:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:25 +0100 |
commit | 65856fbddeb56b2975d54c02f6d4a371ca700486 (patch) | |
tree | 32ed9243dd98099fbc19aa5a08c416dfdfe5a28b /src/post-refinement.c | |
parent | c97643b36f4ad74900b4709243196f289b47d45d (diff) |
cos(azi) must come in somehow...
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r-- | src/post-refinement.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index f437d98e..2d2084db 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -88,7 +88,7 @@ static double partiality_rgradient(double r, double profile_radius) /* Return the gradient of parameter 'k' given the current status of 'image'. */ static double gradient(struct image *image, int k, Reflection *refl, double r) { - double ds, tt; + double ds, tt, azi; double nom, den; double g = 0.0; double asx, asy, asz; @@ -110,6 +110,7 @@ static double gradient(struct image *image, int k, Reflection *refl, double r) ds = 2.0 * resolution(image->indexed_cell, hi, ki, li); tt = angle_between(0.0, 0.0, 1.0, xl, yl, zl+k); + azi = angle_between(1.0, 0.0, 0.0, xl, yl, 0.0); get_partial(refl, &r1, &r2, &p, &clamp_low, &clamp_high); @@ -141,7 +142,7 @@ static double gradient(struct image *image, int k, Reflection *refl, double r) /* Cell parameters and orientation */ case REF_ASX : - return hi * sin(tt) * g; + return hi * sin(tt) * cos(azi) * g; case REF_BSX : return ki * sin(tt) * g; case REF_CSX : |