Changes in / [a69d8cd:ecb485c] in sasmodels
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/mixture.py
r7fec3b7 recf895e 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 hasattr(part,"operation") and part.operation== '*':96 if prefix == '' and getattr(part, "operation", '') == '*': 97 97 # `part` is a composition product model. Find the prefixes of 98 # it's parameters to form a new prefix for the scale , eg:99 # a model with A*B*C will have ABC_scale98 # it's parameters to form a new prefix for the scale. 99 # For example, a model with A*B*C will have ABC_scale. 100 100 sub_prefixes = [] 101 101 for param in part.parameters.kernel_parameters: -
sasmodels/modelinfo.py
r108e70e r95498a3 69 69 processed.append(parse_parameter(*p)) 70 70 partable = ParameterTable(processed) 71 partable.check_angles() 71 72 return partable 72 73 … … 421 422 # type: (List[Parameter]) -> None 422 423 self.kernel_parameters = parameters 423 self._check_angles()424 424 self._set_vector_lengths() 425 425 … … 471 471 self.pd_2d = set(p.name for p in self.call_parameters if p.polydisperse) 472 472 473 def _check_angles(self): 473 def check_angles(self): 474 """ 475 Check that orientation angles are theta, phi and possibly psi. 476 """ 474 477 theta = phi = psi = -1 475 478 for k, p in enumerate(self.kernel_parameters): … … 494 497 if psi >= 0 and psi != phi+1: 495 498 raise TypeError("psi must follow phi") 496 #if (psi >= 0 and psi != last_par) or (psi < 0 and phi != last_par):497 #raise TypeError("orientation parameters must appear at the "498 #"end of the parameter table")499 if (psi >= 0 and psi != last_par) or (psi < 0 and phi != last_par): 500 raise TypeError("orientation parameters must appear at the " 501 "end of the parameter table") 499 502 elif theta >= 0 or phi >= 0 or psi >= 0: 500 503 raise TypeError("oriented shapes must have both theta and phi and maybe psi")
Note: See TracChangeset
for help on using the changeset viewer.