Changeset 1253
 Timestamp:
 Mar 19, 2014 11:28:33 AM (8 years ago)
 Location:
 trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIpwdGUI.py
r1252 r1253 2597 2597 sizeSizer.Add((5,5),0) 2598 2598 fitSizer = wx.BoxSizer(wx.HORIZONTAL) 2599 methods = ['MaxEnt', ] #'IPG',]2599 methods = ['MaxEnt','IPG',] 2600 2600 fitSizer.Add(wx.StaticText(G2frame.dataDisplay,label='Fitting method: '),0,WACV) 2601 2601 method = wx.ComboBox(G2frame.dataDisplay,value=data['Size']['Method'],choices=methods, 
trunk/GSASIIsasd.py
r1252 r1253 693 693 Amat = GmatE*QvecP[:np.newaxis] 694 694 AAmat = np.inner(Amat,Amat) 695 Bvec = datum*QvecP696 Xw = np.ones_like(Bins)*1.e 6695 Bvec = IntE*QvecP 696 Xw = np.ones_like(Bins)*1.e32 697 697 calc = np.dot(G.T,Xw) 698 698 nIter = 0 … … 700 700 while (nIter<IterMax) and (err > 1.): 701 701 #Step 1 in M&Z paper: 702 Qk = np. dot(AAmat,Xw)np.dot(Amat,Bvec)703 Dk = Xw/np. dot(AAmat,Xw)702 Qk = np.inner(AAmat,Xw)np.inner(Amat,Bvec) 703 Dk = Xw/np.inner(AAmat,Xw) 704 704 Pk = Dk*Qk 705 705 #Step 2 in M&Z paper: 706 alpSt = np. dot(Pk,Qk)/np.dot(Pk,np.dot(AAmat,Pk))706 alpSt = np.inner(Pk,Qk)/np.inner(Pk,np.inner(AAmat,Pk)) 707 707 alpWv = Xw/Pk 708 AkSt = [np.where(Pk[i]<0,np.min((approach*alpWv[i],alpSt)), Pk[i]) for i in range(Pk.shape[0])]708 AkSt = [np.where(Pk[i]<0,np.min((approach*alpWv[i],alpSt)),alpSt) for i in range(Pk.shape[0])] 709 709 #Step 3 in M&Z paper: 710 710 shift = AkSt*Pk 711 print np.sum(shift**2)712 711 Xw += shift 713 712 #done IPG; now results … … 717 716 err = chisq/len(datum) 718 717 if report: 719 print ' Iteration: %d, chisq: %.3g '%(nIter,chisq)718 print ' Iteration: %d, chisq: %.3g, sum(shift^2): %.3g'%(nIter,chisq,np.sum(shift**2)) 720 719 return chisq,Xw,calc 721 720 … … 759 758 Scale = Sample['Scale'][0] 760 759 Sky = 10**data['Size']['MaxEnt']['Sky'] 761 BinsBack = np.ones_like(Bins)*Sky*Scale/Contrast #How about *Scale/Contrast?760 BinsBack = np.ones_like(Bins)*Sky*Scale/Contrast 762 761 Back = data['Back'] 763 762 Q,Io,wt,Ic,Ib = Profile 
trunk/GSASIIstrIO.py
r1248 r1253 578 578 elif SGLaue in ['3R','3mR']: 579 579 isum = ih**2+ik**2+il**2 580 jsum = jh**2+jk**2 *jl**2580 jsum = jh**2+jk**2+jl**2 581 581 isum2 = ih*ik+ih*il+ik*il 582 582 jsum2 = jh*jk+jh*jl+jk*jl
Note: See TracChangeset
for help on using the changeset viewer.