Changeset 40a87fa in sasmodels for sasmodels/modelinfo.py


Ignore:
Timestamp:
Aug 8, 2016 9:24:11 AM (8 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:
2472141
Parents:
2d65d51
Message:

lint and latex cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/modelinfo.py

    r50ec515 r40a87fa  
    4646] 
    4747assert (len(COMMON_PARAMETERS) == 2 
    48         and COMMON_PARAMETERS[0][0]=="scale" 
    49         and COMMON_PARAMETERS[1][0]=="background"), "don't change common parameters" 
     48        and COMMON_PARAMETERS[0][0] == "scale" 
     49        and COMMON_PARAMETERS[1][0] == "background"), "don't change common parameters" 
    5050 
    5151 
     
    131131 
    132132    # automatically identify sld types 
    133     if ptype== '' and (pid.startswith('sld') or pid.endswith('sld')): 
     133    if ptype == '' and (pid.startswith('sld') or pid.endswith('sld')): 
    134134        ptype = 'sld' 
    135135 
     
    182182        scalars = dict((name, value) for name, value in pars.items() 
    183183                       if name not in lookup or lookup[name].length == 1) 
    184         vectors = dict((name,value) for name,value in pars.items() 
     184        vectors = dict((name, value) for name, value in pars.items() 
    185185                       if name in lookup and lookup[name].length > 1) 
    186186        #print("lookup", lookup) 
     
    199199                    # supoprt for the form 
    200200                    #    dict(thickness=[20,10,3]) 
    201                     for (k,v) in enumerate(value): 
     201                    for (k, v) in enumerate(value): 
    202202                        scalars[name+str(k+1)] = v 
    203203        result.update(scalars) 
     
    275275 
    276276    * *relative_pd* is true if that polydispersity is a portion of the 
    277     value (so a 10% length dipsersity would use a polydispersity value of 0.1) 
    278     rather than absolute dispersisity (such as an angle plus or minus 
    279     15 degrees). 
     277      value (so a 10% length dipsersity would use a polydispersity value 
     278      of 0.1) rather than absolute dispersisity (such as an angle plus or 
     279      minus 15 degrees). 
    280280 
    281281    *choices* is the option names for a drop down list of options, as for 
     
    325325    def as_function_argument(self): 
    326326        # type: () -> str 
    327         """ 
     327        r""" 
    328328        Declare the variable as a function argument. 
    329329 
    330330        For example, the parameter thickness with length 3 will 
    331         return "double *thickness", with no spaces before and 
     331        return "double \*thickness", with no spaces before and 
    332332        no comma afterward. 
    333333        """ 
     
    370370 
    371371    * *kernel_parameters* is the list of parameters in the kernel parameter 
    372     table, with vector parameter p declared as p[]. 
     372      table, with vector parameter p declared as p[]. 
    373373 
    374374    * *iq_parameters* is the list of parameters to the Iq(q, ...) function, 
    375     with vector parameter p sent as p[]. 
     375      with vector parameter p sent as p[]. 
    376376 
    377377    * *iqxy_parameters* is the list of parameters to the Iqxy(qx, qy, ...) 
    378     function, with vector parameter p sent as p[]. 
     378      function, with vector parameter p sent as p[]. 
    379379 
    380380    * *form_volume_parameters* is the list of parameters to the form_volume(...) 
    381     function, with vector parameter p sent as p[]. 
     381      function, with vector parameter p sent as p[]. 
    382382 
    383383    Problem details, which sets up the polydispersity loops, requires the 
     
    385385 
    386386    * *theta_offset* is the offset of the theta parameter in the kernel parameter 
    387     table, with vector parameters counted as n individual parameters 
    388     p1, p2, ..., or offset is -1 if there is no theta parameter. 
     387      table, with vector parameters counted as n individual parameters 
     388      p1, p2, ..., or offset is -1 if there is no theta parameter. 
    389389 
    390390    * *max_pd* is the maximum number of polydisperse parameters, with vector 
    391     parameters counted as n individual parameters p1, p2, ...  Note that 
    392     this number is limited to sasmodels.modelinfo.MAX_PD. 
     391      parameters counted as n individual parameters p1, p2, ...  Note that 
     392      this number is limited to sasmodels.modelinfo.MAX_PD. 
    393393 
    394394    * *npars* is the total number of parameters to the kernel, with vector 
    395     parameters counted as n individual parameters p1, p2, ... 
     395      parameters counted as n individual parameters p1, p2, ... 
    396396 
    397397    * *call_parameters* is the complete list of parameters to the kernel, 
    398     including scale and background, with vector parameters recorded as 
    399     individual parameters p1, p2, ... 
     398      including scale and background, with vector parameters recorded as 
     399      individual parameters p1, p2, ... 
    400400 
    401401    * *active_1d* is the set of names that may be polydisperse for 1d data 
     
    406406    the scale and background parameters that the kernel does not see.  User 
    407407    parameters don't use vector notation, and instead use p1, p2, ... 
    408  
    409408    """ 
    410409    # scale and background are implicit parameters 
     
    830829    #: form of "section" or "section:subsection".  So for example, 
    831830    #: :ref:`porod` uses *category="shape-independent"* so it is in the 
    832     #: :ref:`Shape-independent` section whereas 
    833     #: :ref:`capped_cylinder` uses: *category="shape:cylinder"*, which puts 
     831    #: :ref:`shape-independent` section whereas 
     832    #: :ref:`capped-cylinder` uses: *category="shape:cylinder"*, which puts 
    834833    #: it in the :ref:`shape-cylinder` section. 
    835834    category = None         # type: Optional[str] 
    836835    #: True if the model can be computed accurately with single precision. 
    837     #: This is True by default, but models such as :ref:`bcc_paracrystal` set 
     836    #: This is True by default, but models such as :ref:`bcc-paracrystal` set 
    838837    #: it to False because they require double precision calculations. 
    839838    single = None           # type: bool 
Note: See TracChangeset for help on using the changeset viewer.