Changeset 1167


Ignore:
Timestamp:
Dec 16, 2013 9:50:27 AM (8 years ago)
Author:
vondreele
Message:

hyperbola fixes; still problem with azm not correctly referenced to cone axis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r1166 r1167  
    329329    stth = sind(tth)
    330330    ctth = cosd(tth)
    331     sinb = sind(tilt)
    332331    cosb = cosd(tilt)
    333     tanb = tand(tilt)
    334332    if radii[0] > 0.:
     333        sinb = sind(tilt)
     334        tanb = tand(tilt)
    335335        fplus = dist*tanb*stth/(cosb+stth)
    336336        fminus = dist*tanb*stth/(cosb-stth)
     
    345345        xy += cent
    346346    else:   #hyperbola - both branches (one is way off screen!)
     347        sinb = abs(sind(tilt))
     348        tanb = abs(tand(tilt))
    347349        f = dist*tanb*stth/(cosb+stth)
    348350        v = dist*(tanb+tand(tth-abs(tilt)))
     
    356358            offset = -f
    357359            xy = [-R*cosd(azm)-offset,-R*sind(azm)]
    358         xy = -np.array([xy[0]*cosd(phi)-xy[1]*sind(phi),xy[0]*sind(phi)+xy[1]*cosd(phi)])
     360        xy = -np.array([xy[0]*cosd(phi)+xy[1]*sind(phi),xy[0]*sind(phi)-xy[1]*cosd(phi)])
    359361        xy += cent
    360362    return xy
Note: See TracChangeset for help on using the changeset viewer.