Changeset 71bf6de in sasmodels
- Timestamp:
- Jan 12, 2018 8:44:30 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- ffc2a61, 7624dd3
- Parents:
- 791281c
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r2d81cfe r71bf6de 149 149 """ 150 150 if '@' in model_string: 151 parts = model_string.split('@') 152 if len(parts) != 2: 153 raise ValueError("Use P@S to apply a structure factor S to model P") 154 P_info, Q_info = [load_model_info(part) for part in parts] 155 return product.make_product_info(P_info, Q_info) 151 terms = model_string.split('+') 152 results = [] 153 for term in terms: 154 if '@' in term: 155 p_info, q_info = [load_model_info(part) 156 for part in term.split("@")] 157 results.append(product.make_product_info(p_info, q_info)) 158 else: 159 results.append(load_model_info(term)) 160 return mixture.make_mixture_info(results, operation='+') 161 # parts = model_string.split('@') 162 # if len(parts) != 2: 163 # raise ValueError("Use P@S to apply a structure factor S to model P") 164 # P_info, Q_info = [load_model_info(part) for part in parts] 165 # return product.make_product_info(P_info, Q_info) 156 166 157 167 product_parts = [] -
sasmodels/mixture.py
r2d81cfe r71bf6de 94 94 # If model is a sum model, each constituent model gets its own scale parameter 95 95 scale_prefix = prefix 96 if prefix == '' and part.operation == '*':96 if prefix == '' and hasattr(part,"operation") and part.operation == '*': 97 97 # `part` is a composition product model. Find the prefixes of 98 98 # it's parameters to form a new prefix for the scale, eg:
Note: See TracChangeset
for help on using the changeset viewer.