Changeset 301
- Timestamp:
- Jun 11, 2011 12:40:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwd.py
r299 r301 459 459 Result for fcj.pdf 460 460 ----------------------------------------- 461 if x < t & s = S/L+H/L: 462 fcj.pdf = [1/sqrt({cos(x)**2/cos(t)**2}-1) - 1/s]/cos(x) 463 if x >= t: 461 T = x*dx+t 462 s = S/L+H/L 463 if x < 0: 464 fcj.pdf = [1/sqrt({cos(T)**2/cos(t)**2}-1) - 1/s]/|cos(T)| 465 if x >= 0: 464 466 fcj.pdf = 0 465 467 """ 466 468 def _pdf(self,x,t,s,dx): 467 # T = np.where(t<=90.,dx*x+t,180.-dx*x-t)468 469 T = dx*x+t 469 470 ax = npcosd(T)**2 … … 729 730 Rwp = min(100.,np.sqrt(np.sum(M**2)/np.sum(weights*ydata**2))*100.) 730 731 if dlg: 731 dlg.Update(Rwp,newmsg='%s%8.3f%s'%('Peak fit Rwp =',Rwp,'%')) 732 GoOn = dlg.Update(Rwp,newmsg='%s%8.3f%s'%('Peak fit Rwp =',Rwp,'%'))[0] 733 if not GoOn: 734 return -M #abort!! 732 735 return M 733 736 … … 748 751 if FitPgm == 'LSQ': 749 752 dlg = wx.ProgressDialog('Residual','Peak fit Rwp = ',101.0, 750 style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_REMAINING_TIME )753 style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_REMAINING_TIME|wx.PD_CAN_ABORT) 751 754 screenSize = wx.ClientDisplayRect() 752 755 Size = dlg.GetSize() … … 767 770 try: 768 771 sig = np.sqrt(np.diag(result[1])*chisq) 772 if np.any(np.isnan(sig)): 773 print '*** Least squares aborted - some invalid esds possible ***' 769 774 break #refinement succeeded - finish up! 770 775 except ValueError: #result[1] is None on singular matrix
Note: See TracChangeset
for help on using the changeset viewer.