Changeset 2284 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
May 20, 2016 12:37:52 PM (6 years ago)
Author:
vondreele
Message:

update binwin64 (probably no different from previous one)
add Stacking Fault-III to tutorial list
fixup HDF5 importer for images - now recovers wavelength, distance, pixel size, etc.
fix float/integer incompatibility in Flat Bkg values
enable/disable if calibrant/nocalibrant for both Calibrate & Recalibrate
fix a float/int error in mouse positioning on image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r2227 r2284  
    166166           
    167167    def OnCalibrate(event):
    168         if not data.get('calibrant'):
    169             G2G.G2MessageBox(G2frame,'A calibrant must first be selected')
    170168        G2frame.dataFrame.GetStatusBar().SetStatusText('Select > 4 points on 1st used ring; LB to pick, RB on point to delete else RB to finish')
    171169        G2frame.ifGetRing = True
     
    825823                pass
    826824            flatbkg.SetValue("%.0f"%(data['Flat Bkg']))   
    827             G2frame.ImageZ += (oldFlat-data['Flat Bkg'])
     825            G2frame.ImageZ += int(oldFlat-data['Flat Bkg'])
    828826            ResetThresholds()
    829827            G2plt.PlotExposedImage(G2frame,event=event)
     
    890888               
    891889        def OnNewCalibrant(event):
    892             data['calibrant'] = calSel.GetValue()
    893             data['calibskip'] = calFile.Calibrants[data['calibrant']][3]
    894             limits = calFile.Calibrants[data['calibrant']][4]
    895             data['calibdmin'],data['pixLimit'],data['cutoff'] = limits
    896             pixLimit.SetValue(str(limits[1]))
    897             cutOff.SetValue('%.1f'%(limits[2]))
    898             calibSkip.SetValue(str(data['calibskip']))
    899             calibDmin.SetValue('%.1f'%(limits[0]))
     890            data['calibrant'] = calSel.GetValue().strip()
     891            if data['calibrant']:
     892                G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=True)
     893                G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=True)
     894                data['calibskip'] = calFile.Calibrants[data['calibrant']][3]
     895                limits = calFile.Calibrants[data['calibrant']][4]
     896                data['calibdmin'],data['pixLimit'],data['cutoff'] = limits
     897                pixLimit.SetValue(str(limits[1]))
     898                cutOff.SetValue('%.1f'%(limits[2]))
     899                calibSkip.SetValue(str(data['calibskip']))
     900                calibDmin.SetValue('%.1f'%(limits[0]))
     901            else:
     902                G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=False)
     903                G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=False)
    900904           
    901905        def OnCalibSkip(event):
     
    10841088    if data.get('calibrant'):
    10851089        G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=True)
     1090        G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=True)
    10861091    else:
    10871092        G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMRECALIBRATE,enable=False)
     1093        G2frame.dataFrame.ImageEdit.Enable(id=G2gd.wxID_IMCALIBRATE,enable=False)
    10881094    G2frame.dataFrame.Bind(wx.EVT_MENU, OnIntegrate, id=G2gd.wxID_IMINTEGRATE)
    10891095    G2frame.dataFrame.Bind(wx.EVT_MENU, OnIntegrateAll, id=G2gd.wxID_INTEGRATEALL)
Note: See TracChangeset for help on using the changeset viewer.