Changeset 4416 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
May 9, 2020 2:14:54 PM (3 years ago)
Author:
vondreele
Message:

fix 3D surface problem when changing mystrain/size axis
remove MPLsubplots - obsolete sine mpl 2.2
reduce mpl > 3.03 warnings to just one
fix plotting of 3D size/mustrain surfaces - now consistent with values & table
add size & mustrain columns to Reflection Lists - checked against plots
provide better escape from crashed sequential refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r4410 r4416  
    47274727                if phaseId:         #is phase deleted?
    47284728                    General = G2frame.GPXtree.GetItemPyData(phaseId)['General']
     4729                    G,g = G2lat.cell2Gmat(General['Cell'][1:7])
     4730                    GA,GB = G2lat.Gmat2AB(G)    #Orthogonalization matricies
     4731                    SGData = General['SGData']
    47294732                    if General.get('Modulated',False):
    47304733                        Super = 1
     4734                    Histograms = G2frame.GPXtree.GetItemPyData(phaseId)['Histograms']
     4735                    histName = G2frame.GPXtree.GetItemText(G2frame.PatternId)
     4736                    histData = Histograms[histName]
     4737                    muStrData = histData['Mustrain']
     4738                    sizeData = histData['Size']
    47314739        rowLabels = []
    47324740        if HKLF:
     
    47444752                refList = np.array([refl[:11+Super] for refl in data[phaseName]])
    47454753                I100 = refList.T[8+Super]*np.array([refl[11+Super] for refl in data[phaseName]])
     4754            MuStr = G2pwd.getMustrain(refList.T[:3],G,SGData,muStrData)
     4755            CrSize = G2pwd.getCrSize(refList.T[:3],G,GB,sizeData)
    47464756            Imax = np.max(I100)
    47474757            if Imax:
    47484758                I100 *= 100.0/Imax
    47494759            if 'C' in Inst['Type'][0]:
    4750                 refs = np.vstack((refList.T[:15+Super],I100)).T
     4760                refs = np.vstack((refList.T[:15+Super],I100,MuStr,CrSize)).T
    47514761            elif 'T' in Inst['Type'][0]:
    4752                 refs = np.vstack((refList.T[:18+Super],I100)).T
     4762                refs = np.vstack((refList.T[:18+Super],I100,MuStr,CrSize)).T
    47534763        rowLabels = [str(i) for i in range(len(refs))]
    47544764        Types = (4+Super)*[wg.GRID_VALUE_LONG,]+4*[wg.GRID_VALUE_FLOAT+':10,4',]+ \
     
    47644774        else:
    47654775            if 'C' in Inst['Type'][0]:
    4766                 colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','Prfo','Trans','ExtP','I100']
    4767                 Types += 4*[wg.GRID_VALUE_FLOAT+':10,3',]
     4776                colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','Prfo','Trans','ExtP','I100','mustrain','Size']
     4777                Types += 6*[wg.GRID_VALUE_FLOAT+':10,3',]
    47684778            elif 'T' in Inst['Type'][0]:
    4769                 colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','alp','bet','wave','Prfo','Abs','Ext','I100']
    4770                 Types += 7*[wg.GRID_VALUE_FLOAT+':10,3',]
     4779                colLabels = ['H','K','L','mul','d','pos','sig','gam','Fosq','Fcsq','phase','Icorr','alp','bet','wave','Prfo','Abs','Ext','I100','mustrain','Size']
     4780                Types += 9*[wg.GRID_VALUE_FLOAT+':10,3',]
    47714781            if Super:
    47724782                colLabels.insert(3,'M')
Note: See TracChangeset for help on using the changeset viewer.