Changeset 4102


Ignore:
Timestamp:
Aug 20, 2019 1:16:48 PM (2 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

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4100 r4102  
    55275527        ImageParams.Append(G2G.wxID_IMLOADCONTROLS,'Load Controls','Load image controls from file')
    55285528        ImageParams.Append(G2G.wxID_LOADELECTEDCONTROLS,'Load Multiple Controls','Load multiple image controls from multiple files')
    5529         ImageParams.Append(G2G.wxID_IMXFERCONTROLS,'Xfer angles','Transfer integration range for other detector distances')
     5529        ImageParams.Append(G2G.wxID_IMXFERCONTROLS,'Xfer controls','Transfer integration controls to other detector distances')
    55305530        ImageParams.Append(G2G.wxID_IMRESETDIST,'Reset dist','Reset all detector dist to set dist')
    55315531        self.PostfillDataMenu()
  • trunk/GSASIIimage.py

    r4090 r4102  
    593593        if sg:
    594594            SGData = G2spc.SpcGroup(sg)[1]
    595             hkl = G2pwd.getHKLpeak(dmin,SGData,A)
     595            hkl = G2pwd.getHKLpeak(dmin,SGData,A,Inst=None,nodup=True)
    596596            HKL += list(hkl)
    597597        else:
    598598            hkl = G2lat.GenHBravais(dmin,bravais,A)
    599599            HKL += list(hkl)
    600     if len(calibrant) > 4:
     600    if len(calibrant) > 5:
    601601        absent = calibrant[5]
    602602    else:
     
    621621            break
    622622        ellipse = GetEllipse(dsp,data)
    623         Ring = makeRing(dsp,ellipse,pixLimit,cutoff,scalex,scaley,ma.array(ImageZ,mask=tam))[0]
     623        if iH not in absent and iH >= skip:
     624            Ring = makeRing(dsp,ellipse,pixLimit,cutoff,scalex,scaley,ma.array(ImageZ,mask=tam))[0]
     625        else:
     626            Ring = makeRing(dsp,ellipse,pixLimit,1000.0,scalex,scaley,ma.array(ImageZ,mask=tam))[0]
    624627        if Ring:
    625628            if iH not in absent and iH >= skip:
     
    721724        if sg:
    722725            SGData = G2spc.SpcGroup(sg)[1]
    723             hkl = G2pwd.getHKLpeak(dmin,SGData,A)
     726            hkl = G2pwd.getHKLpeak(dmin,SGData,A,Inst=None,nodup=True)
    724727            #G2fil.G2Print(hkl)
    725728            HKL += list(hkl)
  • 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}]'
  • trunk/GSASIIpwd.py

    r4080 r4102  
    11341134    return lenR,dRdS
    11351135
    1136 def getHKLpeak(dmin,SGData,A,Inst=None):
     1136def getHKLpeak(dmin,SGData,A,Inst=None,nodup=False):
    11371137    '''
    11381138    Generates allowed by symmetry reflections with d >= dmin
     
    11481148    HKL = G2lat.GenHLaue(dmin,SGData,A)       
    11491149    HKLs = []
     1150    ds = []
    11501151    for h,k,l,d in HKL:
    11511152        ext = G2spc.GenHKLf([h,k,l],SGData)[0]
     
    11531154            ext = G2spc.checkMagextc([h,k,l],SGData)
    11541155        if not ext:
     1156            if nodup and int(10000*d) in ds:
     1157                continue
     1158            ds.append(int(10000*d))
    11551159            if Inst == None:
    11561160                HKLs.append([h,k,l,d,0,-1])
Note: See TracChangeset for help on using the changeset viewer.