Changeset 95498a3 in sasmodels
 Timestamp:
 Jan 26, 2018 9:05:04 PM (4 years ago)
 Branches:
 master, core_shell_microgels, magnetic_model, ticket1257vesicleproduct, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
 Children:
 ecf895e
 Parents:
 49284e1
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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.