Opened 5 years ago
Closed 5 years ago
#852 closed enhancement (fixed)
More unit tests, especially for oriented or 2d models
Reported by: | richardh | Owned by: | richardh |
---|---|---|---|
Priority: | minor | Milestone: | SasView 4.2.0 |
Component: | sasmodels | Keywords: | unit tests |
Cc: | Work Package: | SasView QA and testing |
Description
From my email of 20 Dec 2016, a survey of unit tests, initially for the "oriented" models,
and possibly not now completely accurate, shows that we are rather short of unit tests and really ought to add a lot more.
Fortunately when comparing gpu and cpu computations we can simply use the starting or
demo parameters, but these may not push the boundaries in quite the same way as a well
thought unit test.
[After sorting a bug in the new coordinate transform #836 I later fixed the unit tests in the new coordinates for cylinder (apart from a numerical issue in the 2d test which is sending back a slightly different value) and core_shell_ellipsoid.]
NOTE that currently the symmetric particles (only theta & phi angles)
are using the new angular coordinates, whilst the asymmetric ones
(theta, phi & psi angles) are still on the old coordinates, see #776
discussions about angular dispersity.
New angles theta’, phi’ from from old ones are given by:
cos(theta’) = cos(theta)sin(phi)
tan(phi’) = tan(theta)/cos(phi)
Note when writing unit tests, please make sure that all the parameter
values are numerically different, so that if they get shuffled on passing
through subroutine calls it might be noticed. In the list below "no 2d calc"
means that angular dispersity is not currently allowed.
Cylinder functions
barbell – no tests
capped_cylinder – no tests
core_shell_bicelle – no tests
core_shell_bicelle_elliptical – one 1d test
core_shell_cylinder – no tests
cylinder – one 1d, one 2d test
elliptical_cylinder – one 1d test
flexible_cylinder – three 1d tests, another at Q=.001 commented out with “currently fails in OCL”, no 2d calc
flexible_cylinder_elliptical – three 1d tests, another at Q=.001 commented out with “currently fails in OCL”, no 2d calc
hollow_cylinder – two 1d tests,
pearl_necklace – one 1d test, no 2d calc
pringle – three 1d tests, no 2d calc
stacked_disks – all 1d & 2d, tests commented out
Ellipsoid Functions
core_shell_ellipsoid – two 1d, one 2d test
ellipsoid – no tests
triaxial_ellipsoid – no tests
Lamellae Functions
lamellar – one 1d test, no 2d calc
lamellar_hg – one 1d test, no 2d calc
lamellar_hg_stack_caille – one 1d test, no 2d calc
lamellar_stack_caille – one 1d test, no 2d calc
lamellar_stack_paracrystal – two 1d test, no 2d calc
Paracrystal Functions
bcc_paracrystal – no tests, (does 2d calc, has 3 angles)
fcc_paracrystal – no tests, (does 2d calc, has 3 angles)
sc_paracrystal – three 1d tests, (does 2d calc, has 3 angles)
Parallelepiped Functions
core_shell_parallelepiped - two 1d tests, two 2d tests, (has 3 angles, check in new coords?)
hollow_rectangular_prism – one 1d test, no 2d calc
hollow_rectangular_prism_thin_walls – one 1d test, no 2d calc
parallelepiped - one 1d test, two 2d tests, (has 3 angles, check in new coords?)
rectangular_prism – one 1d test, no 2d calc
Others
I am assuming that all “sphere” and “shape independent” functions are purely 1d.
Change History (4)
comment:1 Changed 5 years ago by butler
- Work Package changed from SasView Bug Fixing to SasView QA and testing
comment:2 Changed 5 years ago by butler
- Milestone changed from sasmodels Next Release +1 to SasView 4.2.0
comment:3 Changed 5 years ago by richardh
comment:4 Changed 5 years ago by richardh
- Resolution set to fixed
- Status changed from new to closed
All the models listed above now have 1d and where appropriate 2d unit tests of some sort. Many of these are included in the sasmodels branch for #890.
There likely other models that still need unit tests, but I will close this ticket.