Changeset 2506 for trunk/GSASIIconstrGUI.py
- Timestamp:
- Oct 26, 2016 12:24:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r2496 r2506 23 23 import numpy as np 24 24 import numpy.ma as ma 25 import numpy.linalg as nl 25 26 import os.path 26 27 import GSASIIpath … … 1178 1179 1179 1180 def MagConstraints(G2frame,oldPhase,newPhase,Trans,Vec): 1181 '''Add constraints for new magnetic phase created via transformation of old 1182 nuclear one 1183 ''' 1184 Histograms,Phases = G2frame.GetUsedHistogramsAndPhasesfromTree() 1185 UseList = newPhase['Histograms'] 1186 detTrans = np.abs(nl.det(Trans)) 1187 opId = oldPhase['pId'] 1188 npId = newPhase['pId'] 1189 item = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Constraints') 1190 constraints = G2frame.PatternTree.GetItemPyData(item) 1191 GSASIIpath.IPyBreak() 1192 for hist in UseList: #HAP 1193 UseList[hist]['Scale'] /= detTrans #scale by 1/volume ratio 1194 UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]] 1195 UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]] 1180 1196 print 'make nuclear-magnetic phase constraints here' 1181 1197
Note: See TracChangeset
for help on using the changeset viewer.