Changeset 411d8bf in sasview


Ignore:
Timestamp:
Apr 12, 2012 3:38:37 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:
92a52ff2
Parents:
2e9c3ea
Message:

Fixing code style problems

Location:
sansmodels/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/python_wrapper/modelTemplate.txt

    re08bd5b r411d8bf  
    2727from sans.models.BaseComponent import BaseComponent 
    2828from sans.models.sans_extension.c_models import [CPYTHONCLASS] 
    29 import copy     
    3029 
    3130def create_[PYTHONCLASS](): 
     31    """ 
     32       Create a model instance 
     33    """ 
    3234    obj = [PYTHONCLASS]() 
    3335    #[CPYTHONCLASS].__init__(obj) is called by [PYTHONCLASS] constructor 
     
    5456        self.name = "[PYTHONCLASS]" 
    5557        ## Model description 
    56         self.description ="""[DESCRIPTION]""" 
     58        self.description = """[DESCRIPTION]""" 
    5759        
    5860        [PAR_DETAILS] 
    5961        ## fittable parameters 
    60         self.fixed=[FIXED] 
     62        self.fixed = [FIXED] 
    6163         
    6264        ## non-fittable parameters 
     
    7880        """ 
    7981        state = (self.__dict__, self.params, self.dispersion) 
    80         return (create_[PYTHONCLASS],tuple(), state, None, None) 
     82        return (create_[PYTHONCLASS], tuple(), state, None, None) 
    8183         
    8284    def clone(self): 
  • sansmodels/src/sans/models/BroadPeakModel.py

    r5385a9e r411d8bf  
    55 
    66from sans.models.BaseComponent import BaseComponent 
    7 from math import fabs 
     7import math 
    88from numpy import power 
    99 
     
    2323        ## Name of the model 
    2424        self.name = "BroadPeak" 
    25         self.description="""I(q) = scale_p/pow(q,exponent)+scale_l/ 
     25        self.description = """I(q) = scale_p/pow(q,exponent)+scale_l/ 
    2626        (1.0 + pow((fabs(q-q_peak)*length_l),exponent_l) )+ background 
    2727             List of default parameters: 
     
    5454 
    5555        #list of parameter that cannot be fitted 
    56         self.fixed= []   
     56        self.fixed = []   
    5757    def _broadpeak(self, x): 
    5858        """ 
     
    6161        inten = self.params['scale_p']/pow(x,self.params['exponent_p']) 
    6262        inten += self.params['scale_l']/(1.0 + \ 
    63                 power((fabs(x-self.params['q_peak'])*self.params['length_l']),\ 
     63                power((math.fabs(x-self.params['q_peak'])*self.params['length_l']),\ 
    6464                    self.params['exponent_l'])) 
    6565 
  • sansmodels/src/sans/models/CorrLengthModel.py

    r18695bf r411d8bf  
    66from sans.models.BaseComponent import BaseComponent 
    77from numpy import power 
     8import math 
    89 
    910class CorrLengthModel(BaseComponent): 
     
    2223        ## Name of the model 
    2324        self.name = "CorrLength" 
    24         self.description="""I(q) = scale_p/pow(q,exponent)+scale_l/ 
     25        self.description = """I(q) = scale_p/pow(q,exponent)+scale_l/ 
    2526            (1.0 + pow((q*length_l),exponent_l) )+ background 
    2627             List of default parameters: 
     
    5051 
    5152        #list of parameter that cannot be fitted 
    52         self.fixed= []   
     53        self.fixed = []   
    5354    def _corrlength(self, x): 
    5455        """ 
  • sansmodels/src/sans/models/PeakLorentzModel.py

    r27fea3f r411d8bf  
    3131        ## Name of the model 
    3232        self.name = "Peak Lorentz Model" 
    33         self.description=""" F(q) = scale/(1+[(q-q0)/B]^2 ) + background 
     33        self.description = """ F(q) = scale/(1+[(q-q0)/B]^2 ) + background 
    3434         
    3535        The model has three parameters:  
     
    5252        self.details['background']        = ['[1/cm]', None, None] 
    5353        #list of parameter that cannot be fitted 
    54         self.fixed= []   
     54        self.fixed = []   
    5555             
    5656    def _PeakLorentz(self, x): 
  • sansmodels/src/sans/models/PorodModel.py

    r9ce41c6 r411d8bf  
    3636        self.details['background'] = ['[1/cm]', None, None] 
    3737        #list of parameter that cannot be fitted 
    38         self.fixed= [] 
     38        self.fixed = [] 
    3939                
    4040    def _porod(self, x): 
  • sansmodels/src/sans/models/TwoLorentzianModel.py

    r18695bf r411d8bf  
    66from sans.models.BaseComponent import BaseComponent 
    77from numpy import power 
     8import math 
    89 
    910class TwoLorentzianModel(BaseComponent): 
     
    2223        ## Name of the model 
    2324        self.name = "TwoLorentzian" 
    24         self.description="""I(q) = scale_1/(1.0 + pow((q*length_1),exponent_1)) 
     25        self.description = """I(q) = scale_1/(1.0 + pow((q*length_1),exponent_1)) 
    2526             + scale_2/(1.0 + pow((q*length_2),exponent_2) )+ background 
    2627             List of default parameters: 
     
    5354 
    5455        #list of parameter that cannot be fitted 
    55         self.fixed= []   
     56        self.fixed = []   
    5657    def _twolorentzian(self, x): 
    5758        """ 
Note: See TracChangeset for help on using the changeset viewer.