Changeset a5b8477 in sasmodels for sasmodels/generate.py
- Timestamp:
- Apr 13, 2016 6:17:10 PM (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:
- 0ce5710
- Parents:
- 60f03de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r7ae2b7f ra5b8477 123 123 polydispersity values for tests. 124 124 125 A n *model_info* dictionary is constructed from the kernel meta data and126 returned to the caller.125 A :class:`modelinfo.ModelInfo` structure is constructed from the kernel meta 126 data and returned to the caller. 127 127 128 128 The doc string at the start of the kernel module will be used to … … 132 132 file systems are case-sensitive, so only use lower case characters for 133 133 file names and extensions. 134 135 136 The function :func:`make` loads the metadata from the module and returns137 the kernel source. The function :func:`make_doc` extracts the doc string138 and adds the parameter table to the top. The function :func:`model_sources`139 returns a list of files required by the model.140 134 141 135 Code follows the C99 standard with the following extensions and conditions:: … … 149 143 all double declarations may be converted to half, float, or long double 150 144 FLOAT_SIZE is the number of bytes in the converted variables 145 146 :func:`load_kernel_module` loads the model definition file and 147 :modelinfo:`make_model_info` parses it. :func:`make_source` 148 converts C-based model definitions to C source code, including the 149 polydispersity integral. :func:`model_sources` returns the list of 150 source files the model depends on, and :func:`timestamp` returns 151 the latest time stamp amongst the source files (so you can check if 152 the model needs to be rebuilt). 153 154 The function :func:`make_doc` extracts the doc string and adds the 155 parameter table to the top. *make_figure* in *sasmodels/doc/genmodel* 156 creates the default figure for the model. [These two sets of code 157 should mignrate into docs.py so docs can be updated in one place]. 151 158 """ 152 159 from __future__ import print_function … … 585 592 Sq_units = "The returned value is a dimensionless structure factor, $S(q)$." 586 593 docs = convert_section_titles_to_boldface(model_info.docs) 594 pars = make_partable(model_info.parameters.COMMON 595 + model_info.parameters.kernel_parameters) 587 596 subst = dict(id=model_info.id.replace('_', '-'), 588 597 name=model_info.name, 589 598 title=model_info.title, 590 parameters= make_partable(model_info.parameters.kernel_parameters),599 parameters=pars, 591 600 returns=Sq_units if model_info.structure_factor else Iq_units, 592 601 docs=docs)
Note: See TracChangeset
for help on using the changeset viewer.