- Timestamp:
- Apr 27, 2015 4:55:12 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIobj.py ¶
r1802 r1813 2007 2007 val = np.sum(val) 2008 2008 return val 2009 2010 class G2Exception(Exception): 2011 def __init__(self,msg): 2012 self.msg = msg 2013 def __str__(self): 2014 return repr(self.msg) 2009 2015 2010 2016 -
TabularUnified trunk/GSASIIstrIO.py ¶
r1805 r1813 1318 1318 except KeyError: 1319 1319 sigA = [0,0,0,0,0,0] 1320 1320 if np.any(np.diag(G2lat.A2Gmat(A,False))) < 0.: 1321 raise G2obj.G2Exception('Negative g-tensor') 1321 1322 return A,sigA 1322 1323 -
TabularUnified trunk/GSASIIstrMain.py ¶
r1812 r1813 211 211 print ' Refinement results are in file: '+ospath.splitext(GPXfile)[0]+'.lst' 212 212 print ' ***** Refinement successful *****' 213 except G2 stMth.UserAbort:213 except G2obj.G2Exception,Msg: 214 214 printFile.close() 215 return False, 'Refinement aborted by user'215 return False,Msg.msg 216 216 217 217 #for testing purposes!!! … … 425 425 newparm = ':'.join(items) 426 426 NewparmDict[newparm] = parmDict[parm] 427 except G2 stMth.UserAbort:427 except G2obj.G2Exception,Msg: 428 428 printFile.close() 429 429 print ' ***** Refinement aborted *****' 430 return False, ' Refinement aborted by user'430 return False,Msg.msg 431 431 G2stIO.SetSeqResult(GPXfile,Histograms,SeqResult) 432 432 printFile.close() -
TabularUnified trunk/GSASIIstrMath.py ¶
r1812 r1813 27 27 import GSASIImapvars as G2mv 28 28 import GSASIImath as G2mth 29 import GSASIIobj as G2obj 29 30 30 31 sind = lambda x: np.sin(x*np.pi/180.) … … 2801 2802 parmDict['saved values'] = values 2802 2803 dlg.Destroy() 2803 raise UserAbort('User abort') #Abort!!2804 raise G2obj.G2Exception('User abort') #Abort!! 2804 2805 pDict,pVals,pWt,pWsum = penaltyFxn(HistoPhases,calcControls,parmDict,varylist) 2805 2806 if len(pVals):
Note: See TracChangeset
for help on using the changeset viewer.