Changes in / [a006b63:0ac3db5] in sasmodels
- Location:
- sasmodels
- Files:
-
- 5 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r3271e20 ra503bfd 722 722 parameters = COMMON_PARAMETERS + kernel_module.parameters, 723 723 source = getattr(kernel_module, 'source', []), 724 oldname = kernel_module.oldname,725 oldpars = kernel_module.oldpars,726 724 ) 727 725 # Fill in attributes which default to None -
sasmodels/models/cylinder.py
r5428233 ra503bfd 43 43 .. figure:: img/orientation2.jpg 44 44 45 Examples of the angles for oriented cylindersagainst the detector plane.45 Examples of the angles for oriented pp against the detector plane. 46 46 47 47 NB: The 2nd virial coefficient of the cylinder is calculated based on the … … 113 113 title = "Right circular cylinder with uniform scattering length density." 114 114 description = """ 115 f(q,alpha)= 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2))116 115 P(q)= 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 116 /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 117 117 118 P(q,alpha)= scale/V*f(q ,alpha)^(2)+background118 P(q,alpha)= scale/V*f(q)^(2)+background 119 119 V: Volume of the cylinder 120 120 R: Radius of the cylinder … … 125 125 :the ouput is P(q)=scale/V*integral 126 126 from pi/2 to zero of... 127 f(q ,alpha)^(2)*sin(alpha)*dalpha + background127 f(q)^(2)*sin(alpha)*dalpha + background 128 128 """ 129 129 … … 169 169 oldpars=dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', solvent_sld='sldSolv') 170 170 171 172 # test values:173 # [174 # [ {parameters}, q, I(q)],175 # [ {parameters}, [q], [I(q)] ],176 # [ {parameters}, [q1, q2, ...], [I(q1), I(q2), ...]],177 178 # [ {parameters}, (qx, qy), I(qx, Iqy)],179 # [ {parameters}, [(qx1, qy1), (qx2, qy2), ...], [I(qx1,qy1), I(qx2,qy2), ...],180 # ...181 # ]182 # Precision defaults to 7 digits (relative) for single, 14 for double183 # May want a limited precision version that checks for 8-n or 15-n digits respectively184 tests = [185 [{}, 0.2, 0.041761386790780453],186 [{'theta':10.0, 'phi':10.0}, [0.2], [0.041761386790780453]],187 [{'theta':10.0, 'phi':10.0}, (0.2, 2.5), 0.038176446608393366],188 [{'theta':10.0, 'phi':10.0}, [(0.2, 2.5)], [0.038176446608393366]],189 ]190 -
sasmodels/sasview_model.py
r0a82216 r250fa25 32 32 33 33 34 def make_class(kernel_module, dtype='single' , namestyle='name'):34 def make_class(kernel_module, dtype='single'): 35 35 """ 36 36 Load the sasview model defined in *kernel_module*. 37 37 38 38 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 SasView42 39 """ 43 40 model = load_model(kernel_module, dtype=dtype) … … 45 42 SasviewModel.__init__(self, model) 46 43 attrs = dict(__init__=__init__) 47 ConstructedModel = type(model.info[ namestyle], (SasviewModel,), attrs)44 ConstructedModel = type(model.info['name'], (SasviewModel,), attrs) 48 45 return ConstructedModel 49 46 … … 57 54 58 55 self.name = model.info['name'] 59 self.oldname = model.info['oldname']60 56 self.description = model.info['description'] 61 57 self.category = None
Note: See TracChangeset
for help on using the changeset viewer.