id summary reporter owner description type status priority milestone component resolution keywords cc workpackage 815 check that integer parameters are handled properly pkienzle pkienzle "sasmodels and bumps do not currently support integer parameters. They are instead sent to the model as floating point values, which may be non-integers when fitting. For each model that has integer parameters: * check that the parameters is converted to an integer, * check that the conversion is consistent in Iq, Iqxy, form_volume, ER, VR, and profile, * check that 0 is supported or excluded via an INVALID macro, * check that conversion from float to conversion is consistent, Should probably be consistent in choice of truncation or rounding. Currently some models use rounding and others use truncation, so sasview management will need to decide which is preferred. The choice should be documented in the plugin models documentation. Rounding has a slight advantage as far as bumps uncertainty analysis is concerned since the average of [n-0.5, n+0.5] is n. Also, it may be slightly more natural for the user to see a value of 3.9 as 4 rather than 3, as would happen for truncation using `trunc` or `floor`. If using rounding, the `rint` function is slightly better than `round` in that it removes the bias by having n+0.5 sometimes round up and sometimes round down, depending on n; neither `round` nor `rint` have been used, so check whether they exist on all C compilers and OpenCL platforms before using. Specific models: * `pearl_necklace` uses `floor(n+0.5)`, which is `round`. `linear_pearls` should use the same as `pearl_necklace`. * `stacked_disks` uses a loop which is equivalent to `ceil`, but the normalization by `n_stacking` does not move to the equivalent integer. * `polymer_micelle` leaves `n_aggreg` as a float. Make sure the equations make sense for real values. * `multilayer_vesicle` uses a loop which is equivalent to `ceil`. * `lamellar_stack_caille`, `lamellar_stack_paracrystal`, and `lamellar_hg_stack_caille` use `trunc`. * `spherical_sld` uses a loop which is equivalent to `ceil` for `n_steps`. Note: `n_steps` should not be a fittable parameter. * `core_multi_shell`, `onion`, `spherical_sld` do not use a fittable value for the number of shells so it doesn't matter for now. Similarly for `unified_power_Rg` and `rpa`. " defect closed major SasView 4.1.0 SasView fixed SasView Bug Fixing