Changeset 7b3e62c in sasmodels
- Timestamp:
- Mar 16, 2016 10:07:19 AM (9 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:
- 91c5fdc
- Parents:
- 8e45182
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
rb8e5e21 r7b3e62c 46 46 Load model info and build model. 47 47 """ 48 parts = model_name.split('+') 49 if len(parts) > 1: 50 from .mixture import MixtureModel 51 models = [load_model(p, **kw) for p in parts] 52 return MixtureModel(models) 53 54 parts = model_name.split('*') 55 if len(parts) > 1: 56 # Note: currently have circular reference 57 from .product import ProductModel 58 if len(parts) > 2: 59 raise ValueError("use P*S to apply structure factor S to model P") 60 P, Q = [load_model(p, **kw) for p in parts] 61 return ProductModel(P, Q) 62 48 63 return build_model(load_model_info(model_name), **kw) 49 64 … … 55 70 used with functions in generate to build the docs or extract model info. 56 71 """ 72 #import sys; print "\n".join(sys.path) 57 73 __import__('sasmodels.models.'+model_name) 58 74 kernel_module = getattr(models, model_name, None)
Note: See TracChangeset
for help on using the changeset viewer.