Changeset 137


Ignore:
Timestamp:
Jul 30, 2010 3:31:09 PM (11 years ago)
Author:
vondreel
Message:

improve hkl selection in OnMotion?. Now gets tighter as zoom is used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r132 r137  
    290290                    found = []
    291291                    if len(HKL):
    292                         found = HKL[np.where(np.fabs(HKL.T[5]-xpos) < 0.05)]
     292                        view = Page.toolbar._views.forward()[0][:2]
     293                        wid = view[1]-view[0]
     294                        found = HKL[np.where(np.fabs(HKL.T[5]-xpos) < 0.002*wid)]
    293295                    if len(found):
    294296                        h,k,l = found[0][:3]
     
    459461                found = []
    460462                if len(HKL):
    461                     found = HKL[np.where(np.fabs(HKL.T[5]-xpos) < 0.05)]
     463                    view = Page.toolbar._views.forward()[0][:2]
     464                    wid = view[1]-view[0]
     465                    found = HKL[np.where(np.fabs(HKL.T[5]-xpos) < 0.002*wid)]
    462466                if len(found):
    463467                    h,k,l = found[0][:3]
Note: See TracChangeset for help on using the changeset viewer.