Changeset 3c56da87 in sasmodels for sasmodels/sasview_model.py


Ignore:
Timestamp:
Mar 5, 2015 12:55:38 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
b89f519
Message:

lint cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    rde0c4ba r3c56da87  
    6969        self.dispersion = dict() 
    7070        partype = model.info['partype'] 
    71         for name, units, default, limits, ptype, description in model.info['parameters']: 
     71        for name, units, default, limits, _, _ in model.info['parameters']: 
    7272            self.params[name] = default 
    7373            self.details[name] = [units] + limits 
     
    120120 
    121121 
     122    # pylint: disable=no-self-use 
    122123    def getProfile(self): 
    123124        """ 
     
    213214        """ 
    214215        if isinstance(x, (list, tuple)): 
     216            # pylint: disable=unpacking-non-sequence 
    215217            q, phi = x 
    216218            return self.calculate_Iq([q * math.cos(phi)], 
     
    263265 
    264266 
    265         :param qdist: ndarray of scalar q-values or list [qx,qy] where qx,qy are 1D ndarrays 
     267        :param qdist: ndarray of scalar q-values or list [qx,qy] 
     268        where qx,qy are 1D ndarrays 
    266269        """ 
    267270        if isinstance(qdist, (list, tuple)): 
     
    279282 
    280283        else: 
    281             raise TypeError("evalDistribution expects q or [qx, qy], not %r" % type(qdist)) 
     284            raise TypeError("evalDistribution expects q or [qx, qy], not %r" 
     285                            % type(qdist)) 
    282286 
    283287    def calculate_Iq(self, *args): 
     
    382386        limits = self._model.info['limits'] 
    383387        dis = self.dispersion[par] 
    384         v, w = weights.get_weights( 
     388        value, weight = weights.get_weights( 
    385389            dis['type'], dis['npts'], dis['width'], dis['nsigmas'], 
    386390            self.params[par], limits[par], par in relative) 
    387         return v, w / w.max() 
    388  
     391        return value, weight / np.sum(weight) 
     392 
Note: See TracChangeset for help on using the changeset viewer.