Changeset fe496dd in sasmodels
- Timestamp:
- Aug 16, 2016 1:06:00 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:
- 6b7e2f7
- Parents:
- 725ee36
- git-author:
- Paul Kienzle <pkienzle@…> (08/16/16 00:20:53)
- git-committer:
- Paul Kienzle <pkienzle@…> (08/16/16 01:06:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/mixture.py
rac98886 rfe496dd 28 28 # type: (List[ModelInfo]) -> ModelInfo 29 29 """ 30 Create info block for productmodel.30 Create info block for mixture model. 31 31 """ 32 32 flatten = [] … … 40 40 # Build new parameter list 41 41 combined_pars = [] 42 demo = {} 42 43 for k, part in enumerate(parts): 43 44 # Parameter prefix per model, A_, B_, ... … … 55 56 p.length_control = prefix + p.length_control 56 57 combined_pars.append(p) 58 demo.update((prefix+k, v) for k, v in part.demo.items() 59 if k != "background") 57 60 #print("pars",combined_pars) 58 61 parameters = ParameterTable(combined_pars) … … 76 79 # Remember the component info blocks so we can build the model 77 80 model_info.composition = ('mixture', parts) 78 model_info.demo = {}81 model_info.demo = demo 79 82 return model_info 80 83 … … 115 118 116 119 def __call__(self, call_details, values, cutoff, magnetic): 117 # type: (CallDetails, np.ndarray, np.ndarry, float ) -> np.ndarray120 # type: (CallDetails, np.ndarray, np.ndarry, float, bool) -> np.ndarray 118 121 scale, background = values[0:2] 119 122 total = 0.0 … … 139 142 class MixtureParts(object): 140 143 def __init__(self, model_info, kernels, call_details, values): 144 # type: (ModelInfo, List[Kernel], CallDetails, np.ndarray) -> None 141 145 self.model_info = model_info 142 146 self.parts = model_info.composition[1]
Note: See TracChangeset
for help on using the changeset viewer.