Changeset 842
- Timestamp:
- Jan 31, 2013 3:20:55 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ElementTable.py
r835 r842 11 11 White = (255, 255, 255) 12 12 ElTable = [ 13 (["D","D-1"], 0,0, "Deuterium", White, 0.0000,(255,255,255)),14 (["T","T-1"], 0,0, "Tritium", White, 0.0000,(255,255,255)),13 # (["D","D-1"], 0,0, "Deuterium", White, 0.0000,(255,255,255)), 14 # (["T","T-1"], 0,0, "Tritium", White, 0.0000,(255,255,255)), 15 15 (["H","H-1","D","D-1","T","T-1"],0,0, "Hydrogen", White, 0.0000,(255,255,255)), 16 16 (["He",], 17,0, "Helium", Noblecolor, 0.0000,(217,255,255)), -
trunk/Exercises/single crystal/IB3.EXP
r626 r842 8 8 HSTRY 6 GENLES Win32 Oct 09 15:28:00 2011 Sdsq= 0.111E+05 S/E= 0.776E-04 9 9 HSTRY 7 EXPEDT Win32 Oct 09 15:28:00 2011 LA 10 HSTRY 8 GENLES Win32 Oct 09 15:28:00 2011 Sdsq= 0.599E+04 S/E= 0.280E-02 11 HSTRY 9 EXPEDT Win32 Jan 30 15:32:30 2013 L O 10 12 DSGL CDAT1 DRAD ARAD NOFO 11 13 FOUR CDAT1 PTSN X 1 NOPR 0.00 999.99 … … 50 52 REFN GDNFT Reduced CHI**2 = 25.19 for 14 variables 51 53 REFN STATS Cycle 9 There were 252 observations. Total CHI**2 = 5.9945E+03 54 CIF AUTHOR rvd 52 55 CRS1 PNAM H3OSbF6 53 56 CRS1 ABSCO 1229.96 799.59 441.55 54.09 28.01 0.48 0.48 … … 75 78 CRS1 SG SYM I b 3 76 79 CRS1 SPAXIS 0 0 1 80 CRS11 EXTSN 1 YNN 000 G 81 CRS11 EXTSN1 1.000E-10 1.000E-10 1.000E-10 77 82 HAP1 1ELMFR1 1.0000 N 0 78 83 HAP1 1EXTMAX Max. Extinction is 1.00000 … … 82 87 HST 1 INST 1 83 88 HST 1 CDAT1 MoKa SPHR+PSI F 0.150 0.010 2.000 0 0.0000 89 HST 1 INAME cad4 84 90 HST 1 IRAD 4 85 91 HST 1 NFOBS 259 0 0 0 0 0 0 0 0 … … 119 125 INST 1PHIR -1. 120 126 ZZZZZZZZZZZZ Last EXP file record 121 HSTRY 8 GENLES Win32 Oct 09 15:28:00 2011 Sdsq= 0.599E+04 S/E= 0.280E-02 122 CIF AUTHOR rvd 123 HST 1 INAME cad4 127 HSTRY 10 GENLES Win32 Jan 30 15:32:35 2013 -
trunk/GSASIIconstrGUI.py
r840 r842 975 975 if El not in AtInfo: 976 976 Info = G2elem.GetAtomInfo(El) 977 AtInfo[El] = [Info['Drad'] ['Color']]977 AtInfo[El] = [Info['Drad'],Info['Color']] 978 978 rbData['rbTypes'][r] = El 979 979 vecGrid.SetCellValue(r,c,El) 980 980 PE.Destroy() 981 wx.CallAfter(UpdateVectorRB) 981 982 982 983 def ChangeCell(event): … … 1002 1003 vecGrid.SetTable(vecTable, True) 1003 1004 vecGrid.Bind(wg.EVT_GRID_CELL_CHANGE, ChangeCell) 1004 vecGrid.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, TypeSelect) 1005 if not imag: 1006 vecGrid.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, TypeSelect) 1005 1007 attr = wx.grid.GridCellAttr() 1006 1008 attr.SetEditor(G2phG.GridFractionEditor(vecGrid)) … … 1008 1010 vecGrid.SetColAttr(c, attr) 1009 1011 for row in range(vecTable.GetNumberRows()): 1012 if imag: 1013 vecGrid.SetCellStyle(row,3,VERY_LIGHT_GREY,True) 1010 1014 for col in [4,5,6]: 1011 1015 vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True) … … 1032 1036 Size = VectorRBSizer.GetMinSize() 1033 1037 Size[0] += 40 1034 Size[1] = max(Size[1], 250) + 201038 Size[1] = max(Size[1],450) + 20 1035 1039 VectorRBDisplay.SetSize(Size) 1036 1040 VectorRB.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1) 1037 #Size[1] = min(Size[1],450)1041 Size[1] = min(Size[1],450) 1038 1042 G2frame.dataFrame.setSizePosLeft(Size) 1039 1043 -
trunk/GSASIIphsGUI.py
r841 r842 372 372 def OnChar(self, evt): 373 373 key = evt.GetKeyCode() 374 if key == 15: 375 return 374 376 if key > 255: 375 377 evt.Skip() … … 3640 3642 try: 3641 3643 tbar = float(Obj.GetValue()) 3642 if tbar > =0:3644 if tbar > 0: 3643 3645 UseList[Indx[Obj.GetId()]]['Extinction'][2]['Tbar'] = tbar 3644 3646 except ValueError: 3645 3647 pass 3646 Obj.SetValue("%.2f"%(UseList[Indx[Obj.GetId()]]['Extinction'][2]['Tbar'])) 3648 Obj.SetValue("%.3f"%(UseList[Indx[Obj.GetId()]]['Extinction'][2]['Tbar'])) 3649 3650 def OnCos2TM(event): 3651 Obj = event.GetEventObject() 3652 try: 3653 val = float(Obj.GetValue()) 3654 if 0. < val <= 1.: 3655 UseList[Indx[Obj.GetId()]]['Extinction'][2]['Cos2TM'] = val 3656 except ValueError: 3657 pass 3658 Obj.SetValue("%.3f"%(UseList[Indx[Obj.GetId()]]['Extinction'][2]['Cos2TM'])) 3647 3659 3648 3660 def OnEval(event): … … 3651 3663 try: 3652 3664 val = float(Obj.GetValue()) 3653 if val > =0:3665 if val > 0: 3654 3666 UseList[item[0]]['Extinction'][2][item[1]][0] = val 3655 3667 except ValueError: 3656 3668 pass 3657 Obj.SetValue("% 9.3g"%(UseList[item[0]]['Extinction'][2][item[1]][0]))3669 Obj.SetValue("%10.3e"%(UseList[item[0]]['Extinction'][2][item[1]][0])) 3658 3670 3659 3671 def OnEref(event): … … 3897 3909 typeSizer = wx.BoxSizer(wx.HORIZONTAL) 3898 3910 typeSizer.Add(wx.StaticText(DData,-1,' Extinction type: '),0,wx.ALIGN_CENTER_VERTICAL) 3899 Choices = [' Primary','Secondary Type I','Secondary Type II','Secondary Type I & II']3911 Choices = ['None','Primary','Secondary Type I','Secondary Type II','Secondary Type I & II'] 3900 3912 typeTxt = wx.ComboBox(DData,-1,choices=Choices,value=UseList[item]['Extinction'][1], 3901 3913 style=wx.CB_READONLY|wx.CB_DROPDOWN) … … 3911 3923 typeSizer.Add(approxTxT) 3912 3924 extSizer.Add(typeSizer,0,wx.ALIGN_CENTER_VERTICAL) 3913 extSizer.Add((0,5),) 3914 valSizer =wx.BoxSizer(wx.HORIZONTAL) 3915 valSizer.Add(wx.StaticText(DData,-1,' Tbar(mm):'),0,wx.ALIGN_CENTER_VERTICAL) 3916 tbarVal = wx.TextCtrl(DData,wx.ID_ANY, 3917 '%.3f'%(UseList[item]['Extinction'][2]['Tbar']),style=wx.TE_PROCESS_ENTER) 3918 Indx[tbarVal.GetId()] = item 3919 tbarVal.Bind(wx.EVT_TEXT_ENTER,OnTbarVal) 3920 tbarVal.Bind(wx.EVT_KILL_FOCUS,OnTbarVal) 3921 valSizer.Add(tbarVal,0,wx.ALIGN_CENTER_VERTICAL) 3922 if 'Primary' in UseList[item]['Extinction'][1]: 3923 Ekey = ['Ep',] 3924 elif 'Secondary Type II' == UseList[item]['Extinction'][1]: 3925 Ekey = ['Es',] 3926 elif 'Secondary Type I' == UseList[item]['Extinction'][1]: 3927 Ekey = ['Eg',] 3928 else: 3929 Ekey = ['Eg','Es'] 3930 for ekey in Ekey: 3931 Eref = wx.CheckBox(DData,-1,label=ekey+' : ') 3932 Eref.SetValue(UseList[item]['Extinction'][2][ekey][1]) 3933 Indx[Eref.GetId()] = [item,ekey] 3934 Eref.Bind(wx.EVT_CHECKBOX, OnEref) 3935 valSizer.Add(Eref,0,wx.ALIGN_CENTER_VERTICAL) 3936 Eval = wx.TextCtrl(DData,wx.ID_ANY, 3937 '%9.3g'%(UseList[item]['Extinction'][2][ekey][0]),style=wx.TE_PROCESS_ENTER) 3938 Indx[Eval.GetId()] = [item,ekey] 3939 Eval.Bind(wx.EVT_TEXT_ENTER,OnEval) 3940 Eval.Bind(wx.EVT_KILL_FOCUS,OnEval) 3941 valSizer.Add(Eval,0,wx.ALIGN_CENTER_VERTICAL) 3942 3943 extSizer.Add(valSizer,0,wx.ALIGN_CENTER_VERTICAL) 3925 if UseList[item]['Extinction'][1] != 'None': 3926 extSizer.Add((0,5),) 3927 valSizer =wx.BoxSizer(wx.HORIZONTAL) 3928 valSizer.Add(wx.StaticText(DData,-1,' Tbar(mm):'),0,wx.ALIGN_CENTER_VERTICAL) 3929 tbarVal = wx.TextCtrl(DData,wx.ID_ANY, 3930 '%.3f'%(UseList[item]['Extinction'][2]['Tbar']),style=wx.TE_PROCESS_ENTER) 3931 Indx[tbarVal.GetId()] = item 3932 tbarVal.Bind(wx.EVT_TEXT_ENTER,OnTbarVal) 3933 tbarVal.Bind(wx.EVT_KILL_FOCUS,OnTbarVal) 3934 valSizer.Add(tbarVal,0,wx.ALIGN_CENTER_VERTICAL) 3935 valSizer.Add(wx.StaticText(DData,-1,' cos(2ThM):'),0,wx.ALIGN_CENTER_VERTICAL) 3936 cos2tm = wx.TextCtrl(DData,wx.ID_ANY, 3937 '%.3f'%(UseList[item]['Extinction'][2]['Cos2TM']),style=wx.TE_PROCESS_ENTER) 3938 Indx[cos2tm.GetId()] = item 3939 cos2tm.Bind(wx.EVT_TEXT_ENTER,OnCos2TM) 3940 cos2tm.Bind(wx.EVT_KILL_FOCUS,OnCos2TM) 3941 valSizer.Add(cos2tm,0,wx.ALIGN_CENTER_VERTICAL) 3942 extSizer.Add(valSizer,0,wx.ALIGN_CENTER_VERTICAL) 3943 val2Sizer =wx.BoxSizer(wx.HORIZONTAL) 3944 if 'Primary' in UseList[item]['Extinction'][1]: 3945 Ekey = ['Ep',] 3946 elif 'Secondary Type II' == UseList[item]['Extinction'][1]: 3947 Ekey = ['Es',] 3948 elif 'Secondary Type I' == UseList[item]['Extinction'][1]: 3949 Ekey = ['Eg',] 3950 else: 3951 Ekey = ['Eg','Es'] 3952 for ekey in Ekey: 3953 Eref = wx.CheckBox(DData,-1,label=ekey+' : ') 3954 Eref.SetValue(UseList[item]['Extinction'][2][ekey][1]) 3955 Indx[Eref.GetId()] = [item,ekey] 3956 Eref.Bind(wx.EVT_CHECKBOX, OnEref) 3957 val2Sizer.Add(Eref,0,wx.ALIGN_CENTER_VERTICAL) 3958 Eval = wx.TextCtrl(DData,wx.ID_ANY, 3959 '%10.3e'%(UseList[item]['Extinction'][2][ekey][0]),style=wx.TE_PROCESS_ENTER) 3960 Indx[Eval.GetId()] = [item,ekey] 3961 Eval.Bind(wx.EVT_TEXT_ENTER,OnEval) 3962 Eval.Bind(wx.EVT_KILL_FOCUS,OnEval) 3963 val2Sizer.Add(Eval,0,wx.ALIGN_CENTER_VERTICAL) 3964 3965 extSizer.Add(val2Sizer,0,wx.ALIGN_CENTER_VERTICAL) 3944 3966 return extSizer 3945 3967 … … 4074 4096 mainSizer.Add(poSizer) 4075 4097 mainSizer.Add((0,5),0) 4076 #Extinction 'Extinction':[0.0,False]4077 4098 mainSizer.Add(ExtSizer()) 4078 4099 mainSizer.Add((0,5),0) … … 4117 4138 UseList[histoName] = {'Histogram':histoName,'Show':False,'Scale':[1.0,True], 4118 4139 'Babinet':{'BabA':[0.0,False],'BabU':[0.0,False]}, 4119 'Extinction':['Lorentzian',' Secondary Type I',4120 {'Tbar':0. 0,'Eg':[0.0,False],'Es':[0.0,False],'Ep':[0.0,False]},]}4140 'Extinction':['Lorentzian','None', 4141 {'Tbar':0.1,'Cos2TM':0.955,'Eg':[1.e-10,False],'Es':[1.e-10,False],'Ep':[1.e-10,False]},]} 4121 4142 data['Histograms'] = UseList 4122 4143 wx.BeginBusyCursor() -
trunk/GSASIIstruct.py
r838 r842 632 632 cell = General['Cell'] 633 633 A = G2lat.cell2A(cell[1:7]) 634 phaseDict.update({pfx+'A0':A[0],pfx+'A1':A[1],pfx+'A2':A[2],pfx+'A3':A[3],pfx+'A4':A[4],pfx+'A5':A[5]}) 634 phaseDict.update({pfx+'A0':A[0],pfx+'A1':A[1],pfx+'A2':A[2], 635 pfx+'A3':A[3],pfx+'A4':A[4],pfx+'A5':A[5],pfx+'Vol':G2lat.calc_V(A)}) 635 636 if cell[0]: 636 637 phaseVary += cellVary(pfx,SGData) … … 1323 1324 controlDict[pfx+'EType'] = extType 1324 1325 controlDict[pfx+'EApprox'] = extApprox 1326 controlDict[pfx+'Tbar'] = extParms['Tbar'] 1327 controlDict[pfx+'Cos2TM'] = extParms['Cos2TM'] 1325 1328 if 'Primary' in extType: 1326 1329 Ekey = ['Ep',] 1330 elif 'I & II' in extType: 1331 Ekey = ['Eg','Es'] 1327 1332 elif 'Secondary Type II' == extType: 1328 1333 Ekey = ['Es',] 1329 1334 elif 'Secondary Type I' == extType: 1330 1335 Ekey = ['Eg',] 1331 else: 1332 Ekey = [ 'Eg','Es']1336 else: #'None' 1337 Ekey = [] 1333 1338 for eKey in Ekey: 1334 1339 hapDict[pfx+eKey] = extParms[eKey][0] … … 1343 1348 print >>pFile,135*'-' 1344 1349 print >>pFile,' Scale factor : %10.4f'%(hapData['Scale'][0]),' Refine?',hapData['Scale'][1] 1345 print >>pFile,' Extinction approx: %10s'%(extApprox),' Type: %15s'%(extType),' tbar: %6.3f'%(extParms['Tbar']) 1346 text = ' Parameters :' 1347 for eKey in Ekey: 1348 text += ' %4s : %10.3g Refine? '%(eKey,extParms[eKey][0])+str(extParms[eKey][1]) 1349 print >>pFile,text 1350 if extType != 'None': 1351 print >>pFile,' Extinction Type: %15s'%(extType),' approx: %10s'%(extApprox),' tbar: %6.3f'%(extParms['Tbar']) 1352 text = ' Parameters :' 1353 for eKey in Ekey: 1354 text += ' %4s : %10.3e Refine? '%(eKey,extParms[eKey][0])+str(extParms[eKey][1]) 1355 print >>pFile,text 1350 1356 PrintBabinet(hapData['Babinet']) 1351 1357 Histogram['Reflection Lists'] = phase … … 1474 1480 print >>pFile,sigstr 1475 1481 1482 def PrintExtAndSig(pfx,hapData,ScalExtSig): 1483 print >>pFile,'\n Single crystal extinction: Type: ',hapData[0],' Approx: ',hapData[1] 1484 text = '' 1485 for item in hapData[2]: 1486 if pfx+item in ScalExtSig: 1487 text += ' %s: '%(item) 1488 text += '%12.2e'%(hapData[2][item][0]) 1489 if pfx+item in ScalExtSig: 1490 text += ' sig: %12.2e'%(ScalExtSig[pfx+item]) 1491 print >>pFile,text 1492 1476 1493 def PrintBabinetAndSig(pfx,hapData,BabSig): 1477 1494 print >>pFile,'\n Babinet form factor modification: ' … … 1566 1583 1567 1584 elif 'HKLF' in histogram: 1568 for item in ['Scale', 'Ep','Eg','Es']:1585 for item in ['Scale',]: 1569 1586 if parmDict.get(pfx+item): 1570 1587 hapData[item][0] = parmDict[pfx+item] 1588 if pfx+item in sigDict: 1589 ScalExtSig[pfx+item] = sigDict[pfx+item] 1590 for item in ['Ep','Eg','Es']: 1591 if parmDict.get(pfx+item): 1592 hapData['Extinction'][2][item][0] = parmDict[pfx+item] 1571 1593 if pfx+item in sigDict: 1572 1594 ScalExtSig[pfx+item] = sigDict[pfx+item] … … 1620 1642 %(Histogram[pfx+'Rf'],Histogram[pfx+'Rf^2'],Histogram[pfx+'Nref']) 1621 1643 print >>pFile,' HKLF histogram weight factor = ','%.3f'%(Histogram['wtFactor']) 1622 if 'Scale' in ScalExtSig:1644 if pfx+'Scale' in ScalExtSig: 1623 1645 print >>pFile,' Scale factor : %10.4f, sig %10.4f'%(hapData['Scale'][0],ScalExtSig[pfx+'Scale']) 1624 PrintBabinetAndSig(pfx,hapData['Babinet'],BabSig) 1646 if hapData['Extinction'][0] != 'None': 1647 PrintExtAndSig(pfx,hapData['Extinction'],ScalExtSig) 1648 if len(BabSig): 1649 PrintBabinetAndSig(pfx,hapData['Babinet'],BabSig) 1625 1650 1626 # fix after it runs!1627 # print >>pFile,'\n Phase: ',phase,' in histogram: ',histogram1628 # print >>pFile,135*'-'1629 # print >>pFile,' Scale factor : %10.4f'%(hapData['Scale'][0]),' Refine?',hapData['Scale'][1]1630 # print >>pFile,' Extinction approx: %10s'%(extApprox),' Type: %15s'%(extType),' tbar: %6.3f'%(extParms['Tbar'])1631 # text = ' Parameters :'1632 # for eKey in Ekey:1633 # text += ' %4s : %10.3g Refine? '%(eKey,extParms[eKey][0])+str(extParms[eKey][1])1634 # print >>pFile,text1635 1636 1651 ################################################################################ 1637 1652 ##### Histogram data … … 2420 2435 dFdvDict[pfx+'BabU'] = dFdbab.T[1] 2421 2436 return dFdvDict 2437 2438 def SCExtinction(ref,phfx,hfx,pfx,calcControls,parmDict,varyList): 2439 ''' Single crystal extinction function; puts correction in ref[13] and returns 2440 corrections needed for derivatives 2441 ''' 2442 ref[13] = 1.0 2443 dervCor = 1.0 2444 dervDict = {} 2445 if calcControls[phfx+'EType'] != 'None': 2446 cos2T = 1.0-0.5*(parmDict[hfx+'Lam']/ref[4])**2 #cos(2theta) 2447 if 'SXC' in parmDict[hfx+'Type']: 2448 AV = 7.9406e5/parmDict[pfx+'Vol']**2 2449 PL = np.sqrt(1.0-cos2T**2)/parmDict[hfx+'Lam'] 2450 P12 = (calcControls[phfx+'Cos2TM']+cos2T**4)/(calcControls[phfx+'Cos2TM']+cos2T**2) 2451 elif 'SNT' in parmDict[hfx+'Type']: 2452 AV = 1.e7/parmDict[pfx+'Vol']**2 2453 PL = 1./(4.*refl[4]**2) 2454 P12 = 1.0 2455 elif 'SNC' in parmDict[hfx+'Type']: 2456 AV = 1.e7/parmDict[pfx+'Vol']**2 2457 PL = np.sqrt(1.0-cos2T**2)/parmDict[hfx+'Lam'] 2458 P12 = 1.0 2459 2460 PLZ = AV*P12*parmDict[hfx+'Lam']**2*ref[7] 2461 if 'Primary' in calcControls[phfx+'EType']: 2462 PLZ *= 1.5 2463 else: 2464 PLZ *= calcControls[phfx+'Tbar'] 2465 2466 if 'Primary' in calcControls[phfx+'EType']: 2467 PSIG = parmDict[phfx+'Ep'] 2468 elif 'I & II' in calcControls[phfx+'EType']: 2469 PSIG = parmDict[phfx+'Eg']/np.sqrt(1.+(parmDict[phfx+'Es']*PL/parmDict[phfx+'Eg'])**2) 2470 elif 'Type II' in calcControls[phfx+'EType']: 2471 PSIG = parmDict[phfx+'Es'] 2472 else: # 'Secondary Type I' 2473 PSIG = parmDict[phfx+'Eg']/PL 2474 2475 AG = 0.58+0.48*cos2T+0.24*cos2T**2 2476 AL = 0.025+0.285*cos2T 2477 BG = 0.02-0.025*cos2T 2478 BL = 0.15-0.2*(0.75-cos2T)**2 2479 if cos2T < 0.: 2480 BL = -0.45*cos2T 2481 CG = 2. 2482 CL = 2. 2483 PF = PLZ*PSIG 2422 2484 2485 if 'Gaussian' in calcControls[phfx+'EApprox']: 2486 PF4 = 1.+CG*PF+AG*PF**2/(1.+BG*PF) 2487 extCor = np.sqrt(PF4) 2488 PF3 = 0.5*(CG+2.*AG*PF/(1.+BG*PF)-AG*PF**2*BG/(1.+BG*PF)**2)/(PF4*extCor) 2489 else: 2490 PF4 = 1.+CL*PF+AL*PF**2/(1.+BL*PF) 2491 extCor = np.sqrt(PF4) 2492 PF3 = 0.5*(CL+2.*AL*PF/(1.+BL*PF)-AL*PF**2*BL/(1.+BL*PF)**2)/(PF4*extCor) 2493 2494 dervCor = (1.+PF)*PF3 2495 if 'Primary' in calcControls[phfx+'EType'] and phfx+'Ep' in varyList: 2496 dervDict[phfx+'Ep'] = -ref[7]*PLZ*PF3 2497 if 'II' in calcControls[phfx+'EType'] and phfx+'Es' in varyList: 2498 dervDict[phfx+'Es'] = -ref[7]*PLZ*PF3*(PSIG/parmDict[phfx+'Es'])**3 2499 if 'I' in calcControls[phfx+'EType'] and phfx+'Eg' in varyList: 2500 dervDict[phfx+'Eg'] = -ref[7]*PLZ*PF3*(PSIG/parmDict[phfx+'Eg'])**3*PL**2 2501 2502 ref[13] = 1./extCor 2503 return dervCor,dervDict 2504 2505 2423 2506 def Dict2Values(parmdict, varylist): 2424 2507 '''Use before call to leastsq to setup list of values for the parameters … … 3286 3369 for iref,ref in enumerate(refList): 3287 3370 if ref[6] > 0: 3371 dervCor,dervDict = SCExtinction(ref,phfx,hfx,pfx,calcControls,parmdict,varylist) #puts correction in refl[13] 3288 3372 if calcControls['F**2']: 3289 3373 if ref[5]/ref[6] >= calcControls['minF/sig']: … … 3291 3375 for j,var in enumerate(varylist): 3292 3376 if var in dFdvDict: 3293 dMdvh[j][iref] = w*dFdvDict[var][iref] 3377 dMdvh[j][iref] = w*dFdvDict[var][iref]*dervCor 3294 3378 if phfx+'Scale' in varylist: 3295 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9] 3379 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9]*dervCor 3296 3380 else: 3297 3381 Fo = np.sqrt(ref[5]) … … 3302 3386 for j,var in enumerate(varylist): 3303 3387 if var in dFdvDict: 3304 dMdvh[j][iref] = w*dFdvDict[var][iref] 3388 dMdvh[j][iref] = w*dFdvDict[var][iref]*np.sqrt(dervCor) 3305 3389 if phfx+'Scale' in varylist: 3306 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9] 3390 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9]*np.sqrt(dervCor) 3391 for item in ['Ep','Es','Eg']: 3392 if phfx+item in varylist: 3393 dMdvh[varylist.index(phfx+item)][iref] = w*dervDict[phfx+item] 3307 3394 else: 3308 3395 continue #skip non-histogram entries … … 3373 3460 for iref,ref in enumerate(refList): 3374 3461 if ref[6] > 0: 3462 dervCor,dervDict = SCExtinction(ref,phfx,hfx,pfx,calcControls,parmdict,varylist) #puts correction in refl[13] 3375 3463 if calcControls['F**2']: 3376 3464 if ref[5]/ref[6] >= calcControls['minF/sig']: … … 3379 3467 for j,var in enumerate(varylist): 3380 3468 if var in dFdvDict: 3381 dMdvh[j][iref] = w*dFdvDict[var][iref] 3469 dMdvh[j][iref] = w*dFdvDict[var][iref]*dervCor 3382 3470 if phfx+'Scale' in varylist: 3383 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9] 3471 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9]*dervCor 3384 3472 else: 3385 3473 if ref[5] > 0.: … … 3392 3480 for j,var in enumerate(varylist): 3393 3481 if var in dFdvDict: 3394 dMdvh[j][iref] = w*dFdvDict[var][iref] 3482 dMdvh[j][iref] = w*dFdvDict[var][iref]*np.sqrt(dervCor) 3395 3483 if phfx+'Scale' in varylist: 3396 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9] 3484 dMdvh[varylist.index(phfx+'Scale')][iref] = w*ref[9]*np.sqrt(dervCor) 3485 for item in ['Ep','Es','Eg']: 3486 if phfx+item in varylist: 3487 dMdvh[varylist.index(phfx+item)][iref] = w*dervDict[phfx+item] 3397 3488 if dlg: 3398 3489 dlg.Update(Histogram['wR'],newmsg='Hessian for histogram %d Rw=%8.3f%s'%(hId,Histogram['wR'],'%'))[0] … … 3474 3565 for i,ref in enumerate(refList): 3475 3566 if ref[6] > 0: 3567 SCExtinction(ref,phfx,hfx,pfx,calcControls,parmdict,varylist) #puts correction in refl[13] 3476 3568 ref[7] = parmdict[phfx+'Scale']*ref[9] 3569 ref[7] *= ref[13] 3477 3570 ref[8] = ref[5]/parmdict[phfx+'Scale'] 3478 3571 if calcControls['F**2']:
Note: See TracChangeset
for help on using the changeset viewer.