Changeset 6652522 in sasmodels for sasmodels/model_test.py
- Timestamp:
- Mar 28, 2019 10:23:00 AM (5 years ago)
- Branches:
- master, ticket-1257-vesicle-product, ticket_1156, ticket_822_more_unit_tests
- Children:
- f942f4d
- Parents:
- a430f5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/model_test.py
ra430f5f r6652522 329 329 else: 330 330 y1 = y 331 y2 = test[3] if notisinstance(test[3], list) else [test[3]]332 F 1, F2, R_eff, volume, volume_ratio = call_Fq(kernel, pars)333 if F 1 is not None: # F1is none for models with Iq instead of Fq334 self._check_vectors(x, y1, F 1, 'F')335 self._check_vectors(x, y2, F 2, 'F^2')331 y2 = test[3] if isinstance(test[3], list) else [test[3]] 332 F, Fsq, R_eff, volume, volume_ratio = call_Fq(kernel, pars) 333 if F is not None: # F is none for models with Iq instead of Fq 334 self._check_vectors(x, y1, F, 'F') 335 self._check_vectors(x, y2, Fsq, 'F^2') 336 336 self._check_scalar(test[4], R_eff, 'R_eff') 337 337 self._check_scalar(test[5], volume, 'volume') 338 338 self._check_scalar(test[6], volume_ratio, 'form:shell ratio') 339 return F 2339 return Fsq 340 340 341 341 def _check_scalar(self, target, actual, name): … … 414 414 """ 415 415 import math 416 if target == 0.: 417 return actual == 0. 416 418 shift = 10**math.ceil(math.log10(np.abs(target))) 417 419 return np.abs(target-actual)/shift < 1.5*10**-digits
Note: See TracChangeset
for help on using the changeset viewer.