Changeset 3377
- Timestamp:
- May 9, 2018 3:50:11 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r3376 r3377 5526 5526 5527 5527 def OnCopySel(event): 5528 data['Copy2Next'] = copySel.GetValue() 5528 data['Copy2Next'] = copySel.GetValue() 5529 5530 def OnClrSeq(event): 5531 sId = GetGPXtreeItemId(G2frame,G2frame.root,'Sequential results') 5532 if sId: 5533 dlg = wx.MessageDialog(G2frame,'Are you sure?','Delete sequential results table',wx.OK|wx.CANCEL) 5534 try: 5535 if dlg.ShowModal() == wx.ID_OK: 5536 G2frame.GPXtree.Delete(sId) 5537 finally: 5538 dlg.Destroy() 5529 5539 5530 5540 seqSizer = wx.BoxSizer(wx.VERTICAL) … … 5552 5562 copySel.SetValue(data['Copy2Next']) 5553 5563 selSizer.Add(copySel,0,WACV) 5564 clrSeq = wx.Button(G2frame.dataWindow,label='Clear previous seq.results') 5565 clrSeq.Bind(wx.EVT_BUTTON,OnClrSeq) 5566 selSizer.Add(clrSeq,0,WACV) 5554 5567 seqSizer.Add(selSizer,0) 5555 5568 return seqSizer … … 6856 6869 vals.append([data[name]['variables'][s] if s is not None else None for s in sellist]) 6857 6870 esds.append([data[name]['sig'][s] if s is not None else None for s in sellist]) 6858 #GSASIIpath.IPyBreak()6859 6871 G2frame.colList += zip(*vals) 6860 6872 G2frame.colSigs += zip(*esds) -
trunk/GSASIIstrIO.py
r3373 r3377 1562 1562 varyList = covData['varyList'] 1563 1563 covMatrix = covData['covMatrix'] 1564 vcov = G2mth.getVCov(RMnames,varyList,covMatrix) 1565 if SGData['SGLaue'] in ['3', '3m1', '31m', '6/m', '6/mmm']: 1566 vcov[1,1] = vcov[3,3] = vcov[0,1] = vcov[1,0] = vcov[0,0] 1567 vcov[1,3] = vcov[3,1] = vcov[0,3] = vcov[3,0] = vcov[0,0] 1568 vcov[1,2] = vcov[2,1] = vcov[2,3] = vcov[3,2] = vcov[0,2] 1569 elif SGData['SGLaue'] in ['m3','m3m']: 1570 vcov[0:3,0:3] = vcov[0,0] 1571 elif SGData['SGLaue'] in ['4/m', '4/mmm']: 1572 vcov[0:2,0:2] = vcov[0,0] 1573 vcov[1,2] = vcov[2,1] = vcov[0,2] 1574 elif SGData['SGLaue'] in ['3R','3mR']: 1575 vcov[0:3,0:3] = vcov[0,0] 1576 # vcov[4,4] = vcov[5,5] = vcov[3,3] 1577 vcov[3:6,3:6] = vcov[3,3] 1578 vcov[0:3,3:6] = vcov[0,3] 1579 vcov[3:6,0:3] = vcov[3,0] 1564 if len(covMatrix): 1565 vcov = G2mth.getVCov(RMnames,varyList,covMatrix) 1566 if SGData['SGLaue'] in ['3', '3m1', '31m', '6/m', '6/mmm']: 1567 vcov[1,1] = vcov[3,3] = vcov[0,1] = vcov[1,0] = vcov[0,0] 1568 vcov[1,3] = vcov[3,1] = vcov[0,3] = vcov[3,0] = vcov[0,0] 1569 vcov[1,2] = vcov[2,1] = vcov[2,3] = vcov[3,2] = vcov[0,2] 1570 elif SGData['SGLaue'] in ['m3','m3m']: 1571 vcov[0:3,0:3] = vcov[0,0] 1572 elif SGData['SGLaue'] in ['4/m', '4/mmm']: 1573 vcov[0:2,0:2] = vcov[0,0] 1574 vcov[1,2] = vcov[2,1] = vcov[0,2] 1575 elif SGData['SGLaue'] in ['3R','3mR']: 1576 vcov[0:3,0:3] = vcov[0,0] 1577 # vcov[4,4] = vcov[5,5] = vcov[3,3] 1578 vcov[3:6,3:6] = vcov[3,3] 1579 vcov[0:3,3:6] = vcov[0,3] 1580 vcov[3:6,0:3] = vcov[3,0] 1581 else: 1582 vcov = np.eye(6) 1580 1583 delt = 1.e-9 1581 1584 drVdA = np.zeros(6) -
trunk/GSASIIstrMain.py
r3371 r3377 112 112 printFile.write(' Refinement time = %8.3fs, %8.3fs/cycle, for %d cycles\n'%(runtime,runtime/ncyc,ncyc)) 113 113 printFile.write(' wR = %7.2f%%, chi**2 = %12.6g, GOF = %6.2f\n'%(Rvals['Rwp'],Rvals['chisq'],Rvals['GOF'])) 114 sig = len(varyList)*[None,] 115 if 'None' in str(type(result[1])): 116 IfOK = False 117 covMatrix = [] 118 break 114 119 IfOK = True 115 120 try: … … 125 130 if not len(varyList): 126 131 covMatrix = [] 127 sig = []128 132 break 129 133 print ('**** Refinement failed - singular matrix ****') … … 450 454 Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2'])) 451 455 # add the uncertainties into the esd dictionary (sigDict) 456 if not IfOK: 457 print('***** Sequential refinement failed at histogram '+histogram) 458 break 452 459 sigDict = dict(zip(varyList,sig)) 453 460 # the uncertainties for dependent constrained parms into the esd dict … … 489 496 # print (' ***** Refinement aborted *****') 490 497 # return False,Msg.msg 491 if Controls.get('Reverse Seq'): 492 histNames.reverse() 493 SeqResult['histNames'] = histNames 498 SeqResult['histNames'] = [item for item in G2stIO.GetHistogramNames(GPXfile,['PWDR',]) if item in SeqResult.keys()] 494 499 G2stIO.SetSeqResult(GPXfile,Histograms,SeqResult) 495 500 printFile.close()
Note: See TracChangeset
for help on using the changeset viewer.