Changeset 4682 for trunk/GSASIIstrMath.py
- Timestamp:
- Dec 26, 2020 12:25:59 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r4672 r4682 3229 3229 #?? 3230 3230 Dij = GetDij(phfx,SGData,parmDict) 3231 A = [parmDict[pfx+'A%d'%(i)]+Dij[i] for i in range(6)] #TODO: need to do somet ing if Dij << 0.3231 A = [parmDict[pfx+'A%d'%(i)]+Dij[i] for i in range(6)] #TODO: need to do something if Dij << 0. 3232 3232 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 3233 if np.any(np.diag(G)<0.) or np.any(np.isnan(A)): 3234 #G2obj.HowDidIgetHere() 3235 raise G2obj.G2Exception('Error in metric tensor refinement\nCheck for refinement of conflicting variables') 3236 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies 3233 if np.any(np.diag(G)<0.): 3234 msg = 'Invalid metric tensor for phase #{}\n ({})'.format( 3235 pId,Phase['General']['Name']) 3236 elif np.any(np.isnan(A)): 3237 msg = 'Infinite metric tensor for phase #{}\n ({})'.format( 3238 pId,Phase['General']['Name']) 3239 else: 3240 msg = None 3241 if msg: 3242 print('\nInvalid cell metric tensor for phase #{} ({})\n'.format( 3243 pId,Phase['General']['Name']), 3244 'values (A): {:.3f} {:.3f} {:.3f} {:.3f} {:.3f} {:.3f}\n' 3245 .format(*A)) 3246 raise G2obj.G2Exception('Error: '+msg+ 3247 ' See console.\nCheck for refinement of conflicting variables') 3248 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matrices 3237 3249 Vst = np.sqrt(nl.det(G)) #V* 3238 3250 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail']:
Note: See TracChangeset
for help on using the changeset viewer.