Changeset 3129


Ignore:
Timestamp:
Oct 8, 2017 9:53:57 PM (4 years ago)
Author:
toby
Message:

bug fixes

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpath.py

    r3127 r3129  
    600600    sys.excepthook = savehook # reset IPython's change to the exception hook
    601601
    602 from IPython.core import ultratb
     602try:
     603    from IPython.core import ultratb
     604except:
     605    pass
    603606def exceptHook(*args):
    604607    '''A routine to be called when an exception occurs. It prints the traceback
  • trunk/GSASIIscriptable.py

    r3123 r3129  
    6363Histogram/Phase objects
    6464------------------------
    65 Each histogram and phase has an object.
    66 Parameters within each individual object can be turned on and off by calling
     65Each phase and powder histogram in a :class:`G2Project` object has an associated
     66object. Parameters within each individual object can be turned on and off by calling
    6767:meth:`G2PwdrData.set_refinements` or :meth:`G2PwdrData.clear_refinements`
    6868for histogram parameters;
     
    7575    params = { 'Limits': [0.8, 12.0],
    7676               'Sample Parameters': ['Absorption', 'Contrast', 'DisplaceX'],
    77                'Background': {'type': 'chebyschev', 'refine': True}
     77               'Background': {'type': 'chebyschev', 'refine': True}}
    7878    some_histogram.set_refinements(params)
    7979
     
    17411741            pass
    17421742
     1743    def get_wR(self):
     1744        """returns the overall weighted profile R factor for a histogram
     1745       
     1746        :returns: a wR value as a percentage or None if not defined
     1747        """
     1748        return self['data'][0].get('wR')
     1749
    17431750    def set_refinements(self, refs):
    17441751        """Sets the refinement parameter 'key' to the specification 'value'
     
    22112218                        h['Show'] = bool(val)
    22122219                elif key == 'Size':
    2213                     # TODO
    2214                     raise NotImplementedError()
     2220                    for h in histograms:
     2221                        if h['Size'][0] == 'isotropic':
     2222                            h['Size'][2][0] = bool(val)
     2223                        elif h['Size'][0] == 'uniaxial':
     2224                            h['Size'][2][1] = bool(val)
     2225                            h['Size'][2][2] = bool(val)
     2226                        else:   # TODO
     2227                            raise NotImplementedError()
    22152228                elif key == 'Use':
    22162229                    for h in histograms:
  • trunk/GSASIIstrMath.py

    r3095 r3129  
    30093009                                    if parmDict[phfx+'LeBail']:
    30103010                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    3011                         MPpool.terminate()
    30123011                elif 'T' in calcControls[hfx+'histType']:
    30133012                    for iref,refl in enumerate(refDict['RefList']):
     
    30363035                                    if parmDict[phfx+'LeBail']:
    30373036                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    3038                         MPpool.terminate()
     3037                if useMP: MPpool.terminate()
    30393038                sumFo = 0.0
    30403039                sumdF = 0.0
     
    41474146                       dMdvh += dmdv
    41484147                       for key in depDerivs.keys(): depDerivDict[key] += depDerivs[key]                       
     4148                MPpool.terminate()
    41494149            else:
    41504150                dMdvh,depDerivDict = getPowderProfileDervMP([parmDict,x[xB:xF],
Note: See TracChangeset for help on using the changeset viewer.