Changeset 40a87fa in sasmodels for sasmodels/modelinfo.py
- Timestamp:
- Aug 8, 2016 9:24:11 AM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/modelinfo.py
r50ec515 r40a87fa 46 46 ] 47 47 assert (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" 50 50 51 51 … … 131 131 132 132 # 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')): 134 134 ptype = 'sld' 135 135 … … 182 182 scalars = dict((name, value) for name, value in pars.items() 183 183 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() 185 185 if name in lookup and lookup[name].length > 1) 186 186 #print("lookup", lookup) … … 199 199 # supoprt for the form 200 200 # dict(thickness=[20,10,3]) 201 for (k, v) in enumerate(value):201 for (k, v) in enumerate(value): 202 202 scalars[name+str(k+1)] = v 203 203 result.update(scalars) … … 275 275 276 276 * *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 minus279 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). 280 280 281 281 *choices* is the option names for a drop down list of options, as for … … 325 325 def as_function_argument(self): 326 326 # type: () -> str 327 """327 r""" 328 328 Declare the variable as a function argument. 329 329 330 330 For example, the parameter thickness with length 3 will 331 return "double *thickness", with no spaces before and331 return "double \*thickness", with no spaces before and 332 332 no comma afterward. 333 333 """ … … 370 370 371 371 * *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[]. 373 373 374 374 * *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[]. 376 376 377 377 * *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[]. 379 379 380 380 * *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[]. 382 382 383 383 Problem details, which sets up the polydispersity loops, requires the … … 385 385 386 386 * *theta_offset* is the offset of the theta parameter in the kernel parameter 387 table, with vector parameters counted as n individual parameters388 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. 389 389 390 390 * *max_pd* is the maximum number of polydisperse parameters, with vector 391 parameters counted as n individual parameters p1, p2, ... Note that392 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. 393 393 394 394 * *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, ... 396 396 397 397 * *call_parameters* is the complete list of parameters to the kernel, 398 including scale and background, with vector parameters recorded as399 individual parameters p1, p2, ...398 including scale and background, with vector parameters recorded as 399 individual parameters p1, p2, ... 400 400 401 401 * *active_1d* is the set of names that may be polydisperse for 1d data … … 406 406 the scale and background parameters that the kernel does not see. User 407 407 parameters don't use vector notation, and instead use p1, p2, ... 408 409 408 """ 410 409 # scale and background are implicit parameters … … 830 829 #: form of "section" or "section:subsection". So for example, 831 830 #: :ref:`porod` uses *category="shape-independent"* so it is in the 832 #: :ref:` Shape-independent` section whereas833 #: :ref:`capped _cylinder` uses: *category="shape:cylinder"*, which puts831 #: :ref:`shape-independent` section whereas 832 #: :ref:`capped-cylinder` uses: *category="shape:cylinder"*, which puts 834 833 #: it in the :ref:`shape-cylinder` section. 835 834 category = None # type: Optional[str] 836 835 #: True if the model can be computed accurately with single precision. 837 #: This is True by default, but models such as :ref:`bcc _paracrystal` set836 #: This is True by default, but models such as :ref:`bcc-paracrystal` set 838 837 #: it to False because they require double precision calculations. 839 838 single = None # type: bool
Note: See TracChangeset
for help on using the changeset viewer.