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

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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:
Note: See TracChangeset for help on using the changeset viewer.