Changeset 1662ebe in sasmodels for sasmodels/modelinfo.py
- Timestamp:
- May 2, 2018 3:02:29 PM (6 years ago)
- Children:
- 765d025
- Parents:
- 6f91c91 (diff), 33969b6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/modelinfo.py
r5ab99b7 r1662ebe 74 74 processed.append(parse_parameter(*p)) 75 75 partable = ParameterTable(processed) 76 partable.check_angles() 76 77 return partable 77 78 … … 426 427 # type: (List[Parameter]) -> None 427 428 self.kernel_parameters = parameters 428 self._check_angles()429 429 self._set_vector_lengths() 430 430 … … 476 476 self.pd_2d = set(p.name for p in self.call_parameters if p.polydisperse) 477 477 478 def _check_angles(self): 478 def check_angles(self): 479 """ 480 Check that orientation angles are theta, phi and possibly psi. 481 """ 479 482 theta = phi = psi = -1 480 483 for k, p in enumerate(self.kernel_parameters): … … 499 502 if psi >= 0 and psi != phi+1: 500 503 raise TypeError("psi must follow phi") 501 #if (psi >= 0 and psi != last_par) or (psi < 0 and phi != last_par):502 #raise TypeError("orientation parameters must appear at the "503 #"end of the parameter table")504 if (psi >= 0 and psi != last_par) or (psi < 0 and phi != last_par): 505 raise TypeError("orientation parameters must appear at the " 506 "end of the parameter table") 504 507 elif theta >= 0 or phi >= 0 or psi >= 0: 505 508 raise TypeError("oriented shapes must have both theta and phi and maybe psi")
Note: See TracChangeset
for help on using the changeset viewer.