- Timestamp:
- Mar 4, 2021 12:42:09 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIddataGUI.py ¶
r4819 r4839 123 123 scaleSizer.Add(scaleRef,0,WACV|wx.LEFT,5) 124 124 scaleVal = G2G.ValidatedTxtCtrl(DData,UseList[G2frame.hist]['Scale'],0, 125 xmin=0.,nDig=(10,4 ),typeHint=float,OnLeave=onChangeFraction)125 xmin=0.,nDig=(10,4,'g'),typeHint=float,OnLeave=onChangeFraction) 126 126 scaleSizer.Add(scaleVal,0,WACV) 127 127 if 'PWDR' in G2frame.hist and generalData['Type'] != 'magnetic': -
TabularUnified trunk/GSASIImath.py ¶
r4838 r4839 3629 3629 return [0,0,0] 3630 3630 hklShape = Fhkl.shape 3631 hklHalf = np.array(hklShape)/ 23631 hklHalf = np.array(hklShape)//2 3632 3632 sortHKL = np.argsort(Fhkl.flatten()) 3633 3633 Fdict = {} … … 3668 3668 Dphi = np.array(Dphi) 3669 3669 steps = np.array(hklShape) 3670 X,Y,Z = np.m grid[0:1:1./steps[0],0:1:1./steps[1],0:1:1./steps[2]]3670 X,Y,Z = np.meshgrid(np.linspace(0,1,steps[0]),np.linspace(0,1,steps[1]),np.linspace(0,1,steps[2])) 3671 3671 XYZ = np.array(list(zip(X.flatten(),Y.flatten(),Z.flatten()))) 3672 3672 Dang = (np.dot(XYZ,DH.T)+.5)%1.-Dphi -
TabularUnified trunk/GSASIIphsGUI.py ¶
r4838 r4839 3235 3235 atomData[r][c] = parms 3236 3236 if 'Atoms' in data['Drawing']: 3237 DrawAtomsReplaceByID(data,ui+6,atomData[r],ID)3237 G2mth.DrawAtomsReplaceByID(data,ui+6,atomData[r],ID) 3238 3238 wx.CallAfter(Paint) 3239 3239 … … 12360 12360 peakMax = np.amax(mapPeaks.T[0]) 12361 12361 Ind = getAtomSelections(MapPeaks) 12362 pgbar = wx.ProgressDialog('Move peaks','Map peak no. 0 processed',len(Ind)+1, 12363 style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE) 12362 12364 for ind in Ind: 12363 12365 mag,x,y,z = mapPeaks[ind][:4] 12364 12366 AtomAdd(x,y,z,'H',Name='M '+'%d'%(int(100*mag/peakMax))) 12367 pgbar.Update(ind,'Map peak no. %d processed'%ind) 12368 pgbar.Destroy() 12365 12369 G2plt.PlotStructure(G2frame,data) 12366 12370 … … 12490 12494 dlg.Destroy() 12491 12495 return 12492 wx.BeginBusyCursor()12493 12496 pgbar = wx.ProgressDialog('Unique peaks','Map peak no. 0 processed',len(Ind)+1, 12494 12497 style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE) 12495 12498 12496 try: 12497 Ind = G2mth.PeaksUnique(data,Ind,sel,pgbar) 12498 print (' No. unique peaks: %d Unique peak fraction: %.3f'%(len(Ind),float(len(Ind))/len(mapPeaks))) 12499 tbl = MapPeaks.GetTable().data 12500 tbl[:] = [t for i,t in enumerate(tbl) if i in Ind] + [ 12501 t for i,t in enumerate(tbl) if i not in Ind] 12502 for r in range(MapPeaks.GetNumberRows()): 12503 if r < len(Ind): 12504 MapPeaks.SelectRow(r,addToSelected=True) 12505 else: 12506 MapPeaks.DeselectRow(r) 12507 finally: 12508 wx.EndBusyCursor() 12499 Ind = G2mth.PeaksUnique(data,Ind,sel,pgbar) 12500 print (' No. unique peaks: %d Unique peak fraction: %.3f'%(len(Ind),float(len(Ind))/len(mapPeaks))) 12501 tbl = MapPeaks.GetTable().data 12502 tbl[:] = [t for i,t in enumerate(tbl) if i in Ind] + [ 12503 t for i,t in enumerate(tbl) if i not in Ind] 12504 for r in range(MapPeaks.GetNumberRows()): 12505 if r < len(Ind): 12506 MapPeaks.SelectRow(r,addToSelected=True) 12507 else: 12508 MapPeaks.DeselectRow(r) 12509 12509 MapPeaks.ForceRefresh() 12510 12510 G2plt.PlotStructure(G2frame,data) -
TabularUnified trunk/GSASIIstrIO.py ¶
r4834 r4839 2596 2596 pFile.write(' Perform LeBail extraction\n') 2597 2597 else: 2598 pFile.write(' Phase fraction : %10.4 fRefine? %s\n'%(hapData['Scale'][0],hapData['Scale'][1]))2598 pFile.write(' Phase fraction : %10.4g Refine? %s\n'%(hapData['Scale'][0],hapData['Scale'][1])) 2599 2599 pFile.write(' Extinction coeff: %10.4f Refine? %s\n'%(hapData['Extinction'][0],hapData['Extinction'][1])) 2600 2600 if hapData['Pref.Ori.'][0] == 'MD': … … 2752 2752 pFile.write('\n Phase: %s in histogram: %s\n'%(phase,histogram)) 2753 2753 pFile.write(135*'='+'\n') 2754 pFile.write(' Scale factor : %10.4 fRefine? %s\n'%(hapData['Scale'][0],hapData['Scale'][1]))2754 pFile.write(' Scale factor : %10.4g Refine? %s\n'%(hapData['Scale'][0],hapData['Scale'][1])) 2755 2755 if extType != 'None': 2756 2756 pFile.write(' Extinction Type: %15s approx: %10s\n'%(extType,extApprox)) … … 3106 3106 wtFr = hapData['Scale'][0]*General['Mass']/wtFrSum[hId] 3107 3107 sigwtFr = PhFrExtPOSig[pfx+'Scale']*wtFr/hapData['Scale'][0] 3108 pFile.write(' Phase fraction : %10.5 f, sig %10.5fWeight fraction : %8.5f, sig %10.5f\n'%3108 pFile.write(' Phase fraction : %10.5g, sig %10.5g Weight fraction : %8.5f, sig %10.5f\n'% 3109 3109 (hapData['Scale'][0],PhFrExtPOSig[pfx+'Scale'],wtFr,sigwtFr)) 3110 3110 if pfx+'Extinction' in PhFrExtPOSig: … … 3135 3135 pFile.write(' HKLF histogram weight factor = %.3f\n'%(Histogram['wtFactor'])) 3136 3136 if pfx+'Scale' in ScalExtSig: 3137 pFile.write(' Scale factor : %10.4 f, sig %10.4f\n'%(hapData['Scale'][0],ScalExtSig[pfx+'Scale']))3137 pFile.write(' Scale factor : %10.4g, sig %10.4g\n'%(hapData['Scale'][0],ScalExtSig[pfx+'Scale'])) 3138 3138 if hapData['Extinction'][0] != 'None': 3139 3139 PrintExtAndSig(pfx,hapData['Extinction'],ScalExtSig)
Note: See TracChangeset
for help on using the changeset viewer.