Changeset 4109


Ignore:
Timestamp:
Aug 22, 2019 1:27:03 PM (2 years ago)
Author:
vondreele
Message:

allow recalibrate of image without any parameters
fix ellipse problem in OnDistRecalib?
Add '*' to global image parameter names & appropriate comment in status bat

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r4108 r4109  
    213213    parmDict.update(zip(varyList,result[0]))
    214214    vals = list(result[0])
    215     sig = list(np.sqrt(chisq*np.diag(result[1])))
    216     sigList = np.zeros(7)
    217     for i,name in enumerate(varyList):
    218         sigList[i] = sig[varyList.index(name)]
    219     ValSig = zip(varyList,vals,sig)
     215    if not len(vals):
     216        sig = []
     217        ValSig = []
     218        sigList = []
     219    else:   
     220        sig = list(np.sqrt(chisq*np.diag(result[1])))
     221        sigList = np.zeros(7)
     222        for i,name in enumerate(varyList):
     223            sigList[i] = sig[varyList.index(name)]
     224        ValSig = zip(varyList,vals,sig)
    220225    if Print:
    221         CalibPrint(ValSig,chisq,rings.shape[0])
     226        if len(sig):
     227            CalibPrint(ValSig,chisq,rings.shape[0])
     228        else:
     229            print(' Nothing refined')
    222230    if covar:
    223231        return [chisq,vals,sigList,result[1]]
  • trunk/GSASIIimgGUI.py

    r4108 r4109  
    360360                    for H in HKL[key][:N]:
    361361                        ellipse = G2img.GetEllipse(H[3],Data)
    362                         data['ellipses'].append(copy.deepcopy(ellipse+('b',)))
     362                        Data['ellipses'].append(copy.deepcopy(ellipse+('b',)))
    363363                G2frame.EnablePlot = True
    364364                G2frame.GPXtree.SelectItem(G2frame.root) # there is probably a better way to force the reload of the current page
     
    10051005            Names.append('dep')
    10061006        Parms = {'dist':['Distance',(10,3),data,'distance'],'det-X':['Beam center X',(10,3),data['center'],0],
    1007             'det-Y':['Beam center Y',(10,3),data['center'],1],'tilt':['Tilt angle',(10,3),data,'tilt'],
    1008             'phi':['Tilt rotation',(10,2),data,'rotation'],'dep':['Penetration',(10,4),data,'DetDepth'],
    1009             'wave':['Wavelength',(10,6),data,'wavelength']}
     1007            'det-Y':['Beam center Y',(10,3),data['center'],1],'tilt':['Tilt angle*',(10,3),data,'tilt'],
     1008            'phi':['Tilt rotation*',(10,2),data,'rotation'],'dep':['Penetration*',(10,4),data,'DetDepth'],
     1009            'wave':['Wavelength*',(10,6),data,'wavelength']}
    10101010        for name in Names:
    10111011            calSel = wx.CheckBox(parent=G2frame.dataWindow,label=Parms[name][0])
     
    14331433        return
    14341434   
     1435    G2frame.GetStatusBar().SetStatusText('* Global parameters in Multi-dist recalib.',1)
    14351436    colorList = sorted([m for m in mpl.cm.datad.keys() ],key=lambda s: s.lower())   #if not m.endswith("_r")
    14361437    calList = sorted([m for m in calFile.Calibrants.keys()],key=lambda s: s.lower())
Note: See TracChangeset for help on using the changeset viewer.