Changeset 4102 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
Aug 20, 2019 1:16:48 PM (3 years ago)
Author:
vondreele
Message:

add transfer of flat background to images corrected for 1/dist2
correct error in recalibrate; eliminate duplicate reflections in e.g. silicon from genHKLpeak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r4072 r4102  
    194194    def OnRecalibrate(event):
    195195        G2img.ImageRecalibrate(G2frame,G2frame.ImageZ,data,masks)
    196         wx.CallLater(100,UpdateImageControls,G2frame,data,masks)
     196        wx.CallAfter(UpdateImageControls,G2frame,data,masks)
    197197       
    198198    def OnRecalibAll(event):
     
    543543                     "label_2":"Xfer scaled 2-theta min", "value_2":False,
    544544                     "label_3":"Xfer scaled 2-theta max", "value_3":True,
     545                     "label_4":"Xfer fixed background  ", "value_4":False,
    545546                     }
    546547        dlg = G2G.G2MultiChoiceDialog(G2frame,'Xfer angles','Transfer integration range from '+Source+' to:',
     
    548549        try:
    549550            if dlg.ShowModal() == wx.ID_OK:
    550                 for i in '_1','_2','_3':
     551                for i in '_1','_2','_3','_4':
    551552                    if extraopts['value'+i]: break
    552553                else:
     
    562563                wave0 = data['wavelength']
    563564                dsp0 = data['calibdmin']
     565                flatBkg = data['Flat Bkg']
    564566                print('distance = {:.2f} integration range: [{:.4f}, {:.4f}], calib dmin {:.3f}'
    565567                            .format(dist0,ttmin0,ttmax0,dsp0))
     
    578580                        print('distance = {:.2f} integration range: [{:.4f}, {:.4f}], calib dmin {:.3f}'
    579581                            .format(dist1,data['IOtth'][0],data['IOtth'][1],data['calibdmin']))
     582                    if extraopts['value_4']:
     583                        data['Flat Bkg'] = flatBkg*(dist0/dist1)**2
    580584                    else:
    581585                        print('distance = {:.2f} integration range: [{:.4f}, {:.4f}]'
Note: See TracChangeset for help on using the changeset viewer.