Changeset 4048


Ignore:
Timestamp:
Jul 2, 2019 10:30:19 AM (3 years ago)
Author:
vondreele
Message:

Use extra reflections generated by Dysnomia in forming new Fourier map

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4040 r4048  
    41654165        reflData = reflSets[generalData['Name']]['RefList']
    41664166        refDmin = reflData[-1][4]
     4167        mulMin = np.argmin(reflData[:,3])
     4168        if reflData[mulMin,3] < 0:
     4169            refDmin = reflData[mulMin-1,4]
    41674170        MEMData = G2frame.MEMData
    41684171        if MEMData.GetSizer():
     
    42964299        wx.CallAfter(UpdateDysnomia)
    42974300       
    4298         if G2pwd.MEMupdateReflData(prfName,reflData):
     4301        goon,reflData = G2pwd.MEMupdateReflData(prfName,data,reflData)
     4302        if goon:
     4303            reflSets[generalData['Name']]['RefList'] = reflData
     4304            G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,pId,'Reflection Lists'),reflSets)
    42994305            OnFourierMaps(event)           #auto run Fourier
    43004306        else:
  • trunk/GSASIIpwd.py

    r4046 r4048  
    30163016    prevpos = 0.
    30173017    for ref in reflData:
     3018        if ref[3] < 0:
     3019            continue
    30183020        if 'T' in Type:
    30193021            h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = ref[:16]
     
    31003102    return True
    31013103
    3102 def MEMupdateReflData(prfName,reflData):
     3104def MEMupdateReflData(prfName,data,reflData):
    31033105    ''' Update reflection data with new Fosq, phase result from Dysnomia
    31043106
     
    31073109    '''
    31083110   
     3111    generalData = data['General']
     3112    cell = generalData['Cell'][1:7]
     3113    A = G2lat.cell2A(cell)
    31093114    reflDict = {}
     3115    newRefs = []
    31103116    for iref,ref in enumerate(reflData):
    3111         reflDict[hash('%5d%5d%5d'%(ref[0],ref[1],ref[2]))] = iref
     3117        if ref[3] > 0:
     3118            newRefs.append(ref)
     3119            reflDict[hash('%5d%5d%5d'%(ref[0],ref[1],ref[2]))] = iref
    31123120    fbaName = os.path.splitext(prfName)[0]+'.fba'
    31133121    try:
     
    31303138            refId = reflDict[hash('%5d%5d%5d'%(h,k,l))]
    31313139        except KeyError:    #added reflections at end skipped
     3140            d = float(1/np.sqrt(G2lat.calc_rDsq([h,k,l],A)))
     3141            newRefs.append([h,k,l,-1,d,0.,0.01,1.0,Fosq,Fosq,phase,1.0,1.0,1.0,1.0])
    31323142            continue
    3133         reflData[refId][8] = Fosq
    3134         reflData[refId][10] = phase
    3135     return True
     3143        newRefs[refId][8] = Fosq
     3144        newRefs[refId][10] = phase
     3145    newRefs = np.array(newRefs)
     3146    return True,newRefs
    31363147   
    31373148#testing data
Note: See TracChangeset for help on using the changeset viewer.