Changeset 139


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

Add "limits" dmin,pixLimit & cutOff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r134 r139  
    2929    def OnNewCalibrant(event):
    3030        data['calibrant'] = calSel.GetValue()
     31        limits = calFile.Calibrants[data['calibrant']][3]
     32        data['pixLimit'] = limits[1]
     33        pixLimit.SetValue(str(limits[1]))
     34        data['cutoff'] = limits[2]
     35        cutOff.SetValue('%.1f'%(limits[2]))
    3136       
    3237    def OnPixLimit(event):
    3338        data['pixLimit'] = int(pixLimit.GetValue())
     39       
     40    def OnCutOff(event):
     41        try:
     42            cutoff = float(cutOff.GetValue())
     43            data['cutoff'] = cutoff
     44        except ValueError:
     45            pass
     46        cutOff.SetValue("%.1f"%(data['cutoff']))          #reset in case of error 
    3447       
    3548    def OnMaxSlider(event):
     
    7992            pass
    8093        waveSel.SetValue("%6.5f" % (data['wavelength']))          #reset in case of error         
    81        
    82     def OnCutOff(event):
    83         try:
    84             cutoff = float(cutOff.GetValue())
    85             data['cutoff'] = cutoff
    86         except ValueError:
    87             pass
    88         cutOff.SetValue("%.1f"%(data['cutoff']))          #reset in case of error 
    8994       
    9095    def OnShowLines(event):
Note: See TracChangeset for help on using the changeset viewer.