Changeset 3076 for branches/mcstas-1.x

Show
Ignore:
Timestamp:
05/16/11 11:56:05 (12 months ago)
Author:
pkwi
Message:

Fixing bug in rectangular focusing routine. Previously, xi/yi/zi in a global reference frame was used locally, the patch transforms back to the local coordinate frame.

See  http://mailman.mcstas.org/pipermail/mcstas-users/2010q4/000845.html and related messages for the bug-report from Markos Skoulatos (bug was also reported by Linda Udby and Johan Jacobsen via other channels.)

Fix is applied both in 1.x branch and on trunk.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mcstas-1.x/lib/share/mcstas-r.c

    r2826 r3076  
    48104810    coords_get(tmp, &*xo, &*yo, &*zo); 
    48114811 
     4812    /* Go back to local coordinate system */ 
     4813    tmp = coords_set(xi, yi, zi); 
     4814    tmp = rot_apply(A, tmp); 
     4815    coords_get(tmp, &xi, &yi, &zi); 
     4816 
    48124817    if (solid_angle) { 
    48134818      /* Calculate vector from local point to remote random point */