Changeset 5513 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Mar 14, 2023 8:25:52 AM (2 years ago)
Author:
vondreele
Message:

fix normalization issues in G2lat.H2ThPh to avoid divide by zeros
spin RB GUI mods
add contour plot of sqrt(W)*delt-Y plot
fix np.int -> np.int32 in G2spc & shapes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIphsGUI.py

    r5510 r5513  
    29492949        for hist in UseList:
    29502950            UseList[hist]['Scale'] /= detTrans      #scale by 1/volume ratio
    2951             UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
    2952             UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
     2951            if 'P' in UseList[hist]['Type']:
     2952                UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
     2953                UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
    29532954        newPhase['General']['Map'] = mapDefault.copy()
    29542955        sub = G2frame.GPXtree.AppendItem(parent=
     
    1145311454                        raise ValueError
    1145411455                    RBObj['Orient'][0] = Q
    11455                     newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,rbType)[0]
    11456                     maxFrac = 0.0
    11457                     for Id in RBObj['Ids']:
    11458                         maxFrac = max(maxFrac,data['Atoms'][AtLookUp[Id]][cx+3])
    11459                     for i,Id in enumerate(RBObj['Ids']):
    11460                         data['Atoms'][AtLookUp[Id]][cx:cx+3] = newXYZ[i]
    11461                         data['Atoms'][AtLookUp[Id]][cx+3] = maxFrac
    11462                     data['Atoms'] = G2lat.RBsymCheck(data['Atoms'],ct,cx,cs,AtLookUp,Amat,RBObj['Ids'],SGData)
     11456                    if rbType != 'Spin':
     11457                        newXYZ = G2mth.UpdateRBXYZ(Bmat,RBObj,RBData,rbType)[0]
     11458                        maxFrac = 0.0
     11459                        for Id in RBObj['Ids']:
     11460                            maxFrac = max(maxFrac,data['Atoms'][AtLookUp[Id]][cx+3])
     11461                        for i,Id in enumerate(RBObj['Ids']):
     11462                            data['Atoms'][AtLookUp[Id]][cx:cx+3] = newXYZ[i]
     11463                            data['Atoms'][AtLookUp[Id]][cx+3] = maxFrac
     11464                        data['Atoms'] = G2lat.RBsymCheck(data['Atoms'],ct,cx,cs,AtLookUp,Amat,RBObj['Ids'],SGData)
    1146311465                    data['Drawing']['Atoms'] = []
    1146411466                    UpdateDrawAtoms()
     
    1157911581                for name in ['atColor','atType','Natoms','nSH','radius','RBname','RBsym']:
    1158011582                    RBObj[name].append(rbData[name])
     11583                RBObj['hide'].append(False)
    1158111584                RBData['Spin'][rbIds[selection]]['useCount'] += 1
    1158211585                G2plt.PlotStructure(G2frame,data)
     
    1288612889            else:
    1288712890                rbNames[key] = ['Residue',rbRes]
    12888         for rbSpn in RBData.get('Spin',{}):     #patch get for old files
    12889             key = RBData['Spin'][rbSpn]['RBname']
    12890             if key in rbNames:
    12891                 dups.append(key)
    12892             else:
    12893                 rbNames[key] = ['Spin',rbSpn]
     12891        if data['General']['Type'] == 'nuclear': #exclude other phase types
     12892            for rbSpn in RBData.get('Spin',{}):     #patch get for old files
     12893                key = RBData['Spin'][rbSpn]['RBname']
     12894                if key in rbNames:
     12895                    dups.append(key)
     12896                else:
     12897                    rbNames[key] = ['Spin',rbSpn]
    1289412898               
    1289512899        if dups:
Note: See TracChangeset for help on using the changeset viewer.