Changeset ea7ffce in sasmodels


Ignore:
Timestamp:
Feb 18, 2015 10:49:30 AM (10 years ago)
Author:
David Mannicke <davidm@…>
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:
5428233 (diff), 9474dda (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

Location:
sasmodels
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    ra503bfd r3271e20  
    722722        parameters = COMMON_PARAMETERS + kernel_module.parameters, 
    723723        source = getattr(kernel_module, 'source', []), 
     724        oldname = kernel_module.oldname, 
     725        oldpars = kernel_module.oldpars, 
    724726        ) 
    725727    # Fill in attributes which default to None 
  • sasmodels/models/cylinder.py

    r5428233 rea7ffce  
    4343.. figure:: img/orientation2.jpg 
    4444 
    45     Examples of the angles for oriented pp against the detector plane. 
     45    Examples of the angles for oriented cylinders against the detector plane. 
    4646 
    4747NB: The 2nd virial coefficient of the cylinder is calculated based on the 
     
    113113title = "Right circular cylinder with uniform scattering length density." 
    114114description = """ 
    115      P(q)= 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
    116             /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
     115     f(q,alpha) = 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
     116                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
    117117 
    118             P(q,alpha)= scale/V*f(q)^(2)+background 
     118            P(q,alpha)= scale/V*f(q,alpha)^(2)+background 
    119119            V: Volume of the cylinder 
    120120            R: Radius of the cylinder 
     
    125125            :the ouput is P(q)=scale/V*integral 
    126126            from pi/2 to zero of... 
    127             f(q)^(2)*sin(alpha)*dalpha + background 
     127            f(q,alpha)^(2)*sin(alpha)*dalpha + background 
    128128""" 
    129129 
  • sasmodels/sasview_model.py

    r250fa25 r0a82216  
    3232 
    3333 
    34 def make_class(kernel_module, dtype='single'): 
     34def make_class(kernel_module, dtype='single', namestyle='name'): 
    3535    """ 
    3636    Load the sasview model defined in *kernel_module*. 
    3737 
    3838    Returns a class that can be used directly as a sasview model. 
     39 
     40    Defaults to using the new name for a model. Setting namestyle='name' 
     41    will produce a class with a name compatible with SasView 
    3942    """ 
    4043    model =  load_model(kernel_module, dtype=dtype) 
     
    4245        SasviewModel.__init__(self, model) 
    4346    attrs = dict(__init__=__init__) 
    44     ConstructedModel = type(model.info['name'],  (SasviewModel,), attrs) 
     47    ConstructedModel = type(model.info[namestyle],  (SasviewModel,), attrs) 
    4548    return ConstructedModel 
    4649 
     
    5457 
    5558        self.name = model.info['name'] 
     59        self.oldname = model.info['oldname'] 
    5660        self.description = model.info['description'] 
    5761        self.category = None 
Note: See TracChangeset for help on using the changeset viewer.