Changeset 3755


Ignore:
Timestamp:
Dec 6, 2018 1:17:49 PM (4 years ago)
Author:
vondreele
Message:

change delt-M for mag. derivative calcs to 1.e-6 - same results.
use this code for single crystal magnetism as well (untestes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r3754 r3755  
    945945    :param dict calcControls:
    946946    :param dict ParmDict:
     947       
     948    :returns: copy of new refList - used in calculating numerical derivatives
    947949
    948950    '''       
     
    10621064
    10631065def MagStructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict):
    1064     '''Compute magnetic structure factor derivatives numerically on blocks of reflections - for powders/nontwins only
     1066    '''Compute magnetic structure factor derivatives numerically - for powders/nontwins only
    10651067    input:
    10661068   
     
    10791081   
    10801082    trefDict = copy.deepcopy(refDict)
    1081     dM = 0.0001
     1083    dM = 1.e-6
    10821084    dFdvDict = {}
    10831085    for parm in parmDict:
     
    37873789            dFdvDict = StructureFactorDervTw2(refDict,G,hfx,pfx,SGData,calcControls,parmDict)
    37883790        else:   #correct!!
    3789             if Phase['General']['Type'] == 'magnetic':  #is this going to work for single crystal mag data?
    3790                 dFdvDict = MagStructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict)
     3791            if Phase['General']['Type'] == 'magnetic':
     3792                dFdvDict = MagStructureFactorDerv(refDict,G,hfx,pfx,SGData,calcControls,parmDict)
     3793                dFdvDict.update(MagStructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict))
    37913794            else:
    37923795                dFdvDict = StructureFactorDerv2(refDict,G,hfx,pfx,SGData,calcControls,parmDict)
Note: See TracChangeset for help on using the changeset viewer.