Ignore:
Timestamp:
Oct 26, 2016 12:24:19 PM (6 years ago)
Author:
vondreele
Message:

some work on automatic mag constraints
move a dlg.Destroy() in OnSeqPeakFit? & OnIndexPeaks? - get rid of orphan wait cursor & progress dialog
more work on mag moment derivs - still wrong! Other derivs now all OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r2496 r2506  
    2323import numpy as np
    2424import numpy.ma as ma
     25import numpy.linalg as nl
    2526import os.path
    2627import GSASIIpath
     
    11781179       
    11791180def 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,]]
    11801196    print 'make nuclear-magnetic phase constraints here'
    11811197       
Note: See TracChangeset for help on using the changeset viewer.