Ignore:
Timestamp:
Apr 18, 2012 1:26:13 PM (13 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
499fe7a
Parents:
3ee4d96
Message:

Fixing code style problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/GaussLorentzGelModel.py

    r79411b2 r279e371  
    1 #!/usr/bin/env python 
    21"""  
    3 Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0) 
    4 GaussLorentzGel function as a BaseComponent model 
     2    Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0) 
     3    GaussLorentzGel function as a BaseComponent model 
    54""" 
    6  
    75from sans.models.BaseComponent import BaseComponent 
    86import math 
     
    5654        #list of parameter that cannot be fitted 
    5755        self.fixed = []   
     56         
    5857    def _gausslorentzgel(self, x): 
    5958        """ 
    6059        Model definition 
    6160        """ 
    62         inten = self.params['scale_g']*math.exp(-1.0*x*x*self.params['stat_colength']* \ 
     61        inten = self.params['scale_g'] \ 
     62                *math.exp(-1.0*x*x*self.params['stat_colength']* \ 
    6363                self.params['stat_colength']/2.0) + self.params['scale_l']/ \ 
    6464                (1.0 + (x*self.params['dyn_colength'])* \ 
     
    7474            return self._gausslorentzgel(x[0]) 
    7575        elif x.__class__.__name__ == 'tuple': 
    76             raise ValueError, "Tuples are not allowed as input to BaseComponent models" 
     76            raise ValueError, "Tuples are not allowed as input to models" 
    7777        else: 
    7878            return self._gausslorentzgel(x) 
     
    8787            return self._gausslorentzgel(q) 
    8888        elif x.__class__.__name__ == 'tuple': 
    89             raise ValueError, "Tuples are not allowed as input to BaseComponent models" 
     89            raise ValueError, "Tuples are not allowed as input to models" 
    9090        else: 
    9191            return self._gausslorentzgel(x) 
Note: See TracChangeset for help on using the changeset viewer.