Changes in / [ecb485c:a69d8cd] in sasmodels
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/mixture.py
recf895e r7fec3b7 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 getattr(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 # it's parameters to form a new prefix for the scale .99 # For example, a model with A*B*C will have ABC_scale.98 # it's parameters to form a new prefix for the scale, eg: 99 # 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
r95498a3 r108e70e 69 69 processed.append(parse_parameter(*p)) 70 70 partable = ParameterTable(processed) 71 partable.check_angles()72 71 return partable 73 72 … … 422 421 # type: (List[Parameter]) -> None 423 422 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): 474 """ 475 Check that orientation angles are theta, phi and possibly psi. 476 """ 473 def _check_angles(self): 477 474 theta = phi = psi = -1 478 475 for k, p in enumerate(self.kernel_parameters): … … 497 494 if psi >= 0 and psi != phi+1: 498 495 raise TypeError("psi must follow phi") 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")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") 502 499 elif theta >= 0 or phi >= 0 or psi >= 0: 503 500 raise TypeError("oriented shapes must have both theta and phi and maybe psi")
Note: See TracChangeset
for help on using the changeset viewer.